Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • 14:38
    kajmagnus commented #4913
  • 14:38
    kajmagnus commented #4913
  • 12:39
    christian-bromann synchronize #8432
  • 12:37
    christian-bromann synchronize #8432
  • 12:37
    christian-bromann synchronize #8432
  • 12:37
    christian-bromann synchronize #8432
  • 12:37
    christian-bromann synchronize #8432
  • 12:37
    christian-bromann synchronize #8432
  • 12:37
    christian-bromann synchronize #8432
  • 12:33
    hammzj commented #8432
  • 12:32
    hammzj synchronize #8432
  • 12:06

    dependabot[bot] on npm_and_yarn

    (compare)

  • 12:06
    dependabot[bot] commented #8471
  • 12:06
    christian-bromann closed #8471
  • 12:06

    christian-bromann on npm_and_yarn

    (compare)

  • 12:06

    christian-bromann on main

    Bump ky from 0.30.0 to 0.31.0 (… (compare)

  • 12:06
    christian-bromann closed #8472
  • 12:05

    dependabot[bot] on npm_and_yarn

    (compare)

  • 12:05

    christian-bromann on main

    Bump @types/estree from 0.0.51 … (compare)

  • 12:05
    christian-bromann closed #8475
Erwin Heitzman
@erwinheitzman
IanHop
@IanHop
Does anyone else have issues setting cookies in safari? Its the only browser that seems to not work for me
manoj0516
@manoj0516
chromedriver not getting updated to 83.x.x, is there a way we can update through node?
Viacheslav
@Gordiievskyi

Hi guys, need help with wdio 6 mocha with opt delay. I can't make it work.

This code works in pure mocha:

var assert = require('assert');
async function returnArr() {
  return [2, 2, 1];
}

setTimeout(async function() {
  const arr = await returnArr();

  describe('my suite', function() {
    for (let el of arr) {
      it(`Is element ${el} has index 1`, async function() {
        assert.equal(arr.indexOf(el), 1);
      });
    }
  });

  run();
}, 500);

But skips it in wdio mocha 'Spec Files: 0 passed, 1 skipped, 1 total (100% completed) in 00:00:03 '

Thats set up for mocha frmaework in the config:

  mochaOpts: {
    ui: 'bdd',
    timeout: 3600000,
    delay: true
  },

Also synchronous version works in wdio(with deleted delay option)

function returnArr() {
  return [2, 2, 1];
}

const arr =  returnArr();

describe('my suite', function() {
  for (let el of arr) {
    it(`Is element ${el} has index 1`, async function() {
      assert.equal(arr.indexOf(el), 1);
    });
  }
});
mikelbauer
@mikelbauer
so, searching back in this gitter for my answer, I don't really find anything, lots of people asking, no one answering. is there not a way in v6 to scroll with an offset anymore? Is my only option to run an execute and use javascript?
3 replies
Mircea Rosioru
@MirceaRosioru_twitter
Hello guys! Quick question: is there a way to use the mocha afterHook to make a screenshot on browser's console? If it is what would be the best practice for this?
Christian Bromann
@christian-bromann
@MirceaRosioru_twitter I recommend to do screenshots in the afterTest hook of your wdio config
Mircea Rosioru
@MirceaRosioru_twitter
I configured the afterTest hook to take a screenshot, but i would like to capture the console of the browser in that screenshot as well, that is what i am trying to do.
Dmitry Munda
@dimkin-eu
why not to save console logs as text ???
Mircea Rosioru
@MirceaRosioru_twitter
well i did not know that this could be done. I tried this casue it seemed like a good ideea ( i am new to this) :D
image.png
Slava Markovski
@slavamarkovski

Hello. I've just started using WDIO - it is really cool. Thank you for the job you've done guys!
And, of course, I have a question - I'm extending browser commands and adding new ones, but Typescript compiler is not really happy. Here is example from the documentation

browser.overwriteCommand('click', function (origClickFunction, { force = false } = {}) { ... });
$('..').click({ force: true })
result is compile error Argument of type '{ force: boolean; }' is not assignable to parameter of type 'ClickOptions'

one more example:
browser.addCommand('isDisplayedAndBlurred', function () { ... });
$('..').isDisplayedAndBlurred()
result is "Property 'clickIfCollapsed' does not exist on type 'Element'."

with ts-ignore everything works like a charm. However there are still compile errors and autocomplete in IDE (WebStorm) doesn't work.
I there any way to fix it?
Thank you in advance.

krishna-auto
@krishna-auto

@krishna-auto there's a blog about that right here https://webdriver.io/blog/2019/06/25/file-upload.html

Hi @erwinheitzman , this worked for me on chrome, but its failing on headless chrome execution and as well as non-headless/headless mode in firefox, same failure "element is not interactable" error, In the above given link its given that "that is currently only supported when running Chrome", anyway to make it work on firefox && chrome headless? Thanks!

Hi, any idea how to make this work on firefox? Thanks!

Christian Bromann
@christian-bromann
@slavamarkovski if you overwrite or add custom commands you need to extend the type definitions yourself
I would not recommend overwriting commands and rather work with page objects
Roman Drobishevski
@romadrobishevski
@christian-bromann is it a known issue when you upgrade your wdio/cli to 6th or higher version
then there is a promise rejection error for uuid module appears? on Mac
Gintautas Kazlauskas
@ploover
browser.execute() doesn't seem to be functional, I was trying to set local storage, but after further testing I found that even things like console.log() or alert() don't work. Are there any prerequisites to use browser.execute()?
1 reply
Christian Bromann
@christian-bromann
@romadrobishevski please don’t ping people directly for requests and ask the channel (please see our channel rules ;-))
Roman Drobishevski
@romadrobishevski
Sorry. I've already asked about it. Nobody answered. But it is quite critical for Mac users i guess.
21 replies
I would like fully upgrade my package but can not do it because of that uuid promise issue
Anton Rybalko
@anton.rybalko_gitlab
image.png
@romadrobishevski
Mircea Rosioru
@MirceaRosioru_twitter
can anybody help me in finding a way to save the browser's console info using webdriverIO V6+ JS Mocha? any specific methods or commands, or documentation related with this?
12 replies
Roman Drobishevski
@romadrobishevski
image.png
Olga
@osmolyar
Friendly bump
Is anyone using ts-node with target=es6? Does anyone know why, with ts-node used as ts compiler, and target=es6 in tsconfig.json, class properties are not recognized? There is a reproducible example available here: https://github.com/osmolyar/Es6_properties_example . Run as 'npx wdio config.js --suite google'. Errors about 'property does not exist on type' occur for class properties that are definitely declared. (If target=es5 it works fine, but I'm not able to use that due to another error with a custom reporter.)
Lakshmi Kamineni
@skamineni
anyone seeing RequestError: socket hang up with V6 and how did you guys solve it ?
Craig232
@Craig232
Hi Guys
I'm experiencing a severe issue when running my webdriverio tests, im on a windows 10 laptop and for reasons unknown to me, I'm getting locked out of my jumpcloud account constantly, it makes no difference if I'm running chrome in the test headless or not Im still getting locked out has anyone had this issue and know how to fix?
Nemanja Jeremic
@nemanjajeremic
has anyone been using WebDriverIO with native android app? I'm having an issue where waitForDisplayed() timeouts even though the element gets displayed
3 replies
Olga
@osmolyar
@skamineni , are you running on a grid? If so, increasing the # of worker VMs can help.
Lakshmi Kamineni
@skamineni
I am running in saucelabs
3 replies
Olga
@osmolyar
@StaroKep if 'this' is not defined inside your step definitions, please make sure your step definitions are not using the arrow syntax for functions since arrow functions don't have a 'this'.
abhishek8791
@abhishek8791
Hey everyone, need suggestions
I want to parallelize my webdriver io tests, by parallelize I mean just reduce the execution time by running multiple instances of browser (no cross-browser) I have tried a couple of ways i.e.
1) Docker - running tests in multiple docker containers in parallel
2) Set up multiple Jenkins jobs with different params
not sure if any of the above approaches are good, any suggestions are welcome, looking for a discussion on the pros and cons
5 replies
Viacheslav
@Gordiievskyi

Hi guys, need help with wdio 6 mocha with opt delay. I can't make it work.

This code works in pure mocha:

var assert = require('assert');
async function returnArr() {
  return [2, 2, 1];
}

setTimeout(async function() {
  const arr = await returnArr();

  describe('my suite', function() {
    for (let el of arr) {
      it(`Is element ${el} has index 1`, async function() {
        assert.equal(arr.indexOf(el), 1);
      });
    }
  });

  run();
}, 500);

But skips it in wdio mocha 'Spec Files: 0 passed, 1 skipped, 1 total (100% completed) in 00:00:03 '

Thats set up for mocha frmaework in the config:

  mochaOpts: {
    ui: 'bdd',
    timeout: 3600000,
    delay: true
  },

Also synchronous version works in wdio(with deleted delay option)

function returnArr() {
  return [2, 2, 1];
}

const arr =  returnArr();

describe('my suite', function() {
  for (let el of arr) {
    it(`Is element ${el} has index 1`, async function() {
      assert.equal(arr.indexOf(el), 1);
    });
  }
});

Seams like a bug

jineshkhimsaria
@jineshkhimsaria

Getting following error when running webdriverIO docker image (alpine-based) with selenium-standalone service & firefox while the same works with ubuntu based docker image -

[0-0] 2020-05-27T13:16:43.803Z DEBUG webdriver: request failed due to status 13
[0-0] 2020-05-27T13:16:43.803Z ERROR webdriver: Request failed with status 500 due to unknown error: invalid argument: can't kill an exited process
Build info: version: '3.141.5', revision: 'd54ebd709a', time: '2018-11-06T11:58:47'
System info: host: 'a8560b87fab4', ip: '172.17.0.2', os.name: 'Linux', os.arch: 'amd64', os.version: '4.19.76-linuxkit', java.version: '11.0.7'
Driver info: driver.version: unknown
remote stacktrace:
[0-0] 2020-05-27T13:16:43.803Z ERROR webdriver: unknown error: invalid argument: can't kill an exited process
Build info: version: '3.141.5', revision: 'd54ebd709a', time: '2018-11-06T11:58:47'
System info: host: 'a8560b87fab4', ip: '172.17.0.2', os.name: 'Linux', os.arch: 'amd64', os.version: '4.19.76-linuxkit', java.version: '11.0.7'
Driver info: driver.version: unknown
remote stacktrace:
    at getErrorFromResponseBody (/airbnb-wdio-poc/node_modules/webdriver/build/utils.js:124:10)
    at WebDriverRequest._request (/airbnb-wdio-poc/node_modules/webdriver/build/request.js:148:56)
    at processTicksAndRejections (internal/process/task_queues.js:97:5)
    at async startWebDriverSession (/airbnb-wdio-poc/node_modules/webdriver/build/utils.js:44:16)
    at async Function.newSession (/airbnb-wdio-poc/node_modules/webdriver/build/index.js:46:23)
    at async remote (/airbnb-wdio-poc/node_modules/webdriverio/build/index.js:66:20)
    at async Runner._startSession (/airbnb-wdio-poc/node_modules/@wdio/runner/build/index.js:219:50)
    at async Runner._initSession (/airbnb-wdio-poc/node_modules/@wdio/runner/build/index.js:175:21)
    at async Runner.run (/airbnb-wdio-poc/node_modules/@wdio/runner/build/index.js:93:15)

Dockerfile -

FROM node:12.16-alpine

ENV NODE_PATH /airbnb-wdio-poc/node_modules/
ENV PATH /airbnb-wdio-poc/node_modules/.bin:$PATH

COPY airbnb-wdio-poc/*.json /airbnb-wdio-poc/
COPY airbnb-wdio-poc/*.js /airbnb-wdio-poc/
COPY airbnb-wdio-poc/pages/ /airbnb-wdio-poc/pages/
COPY airbnb-wdio-poc/tests/ /airbnb-wdio-poc/tests/

WORKDIR /airbnb-wdio-poc/
RUN pwd
RUN apk --no-cache add --virtual native-deps g++ gcc libstdc++ linux-headers make python
RUN echo "http://dl-cdn.alpinelinux.org/alpine/edge/community" >> /etc/apk/repositories
RUN apk update
RUN apk add openjdk11
RUN apk add firefox-esr
RUN npm install --silent
RUN npm audit fix
RUN ls -l
RUN apk del native-deps g++ gcc linux-headers make python

some contents from wdio.conf.js -

capabilities: [{
        maxInstances: 1,
        browserName: 'firefox',
        "moz:firefoxOptions": {
            args: ["-headless"],
          },
}]

services: [['selenium-standalone']]
12 replies
Pablillo Calvo
@pjcalvo
Does that docker image has firefox installed? If not the standalone-service will not be able to work!
daniel anggrianto
@danggrianto
how do you find selector by id on mobile device? using $(#some_id) give me invalid selector: Locator Strategy 'css selector' is not supported for this session
Pablillo Calvo
@pjcalvo
cna you share more details? What is the system under test!
daniel anggrianto
@danggrianto
testing a hybrid app on android using appium.
Pablillo Calvo
@pjcalvo

@danggrianto you need a different approach. Look at this example
https://github.com/pjcalvo/wdio-appium-poc/blob/master/src/pages/home.page.js

Appium lets you identify the locators on the app.

daniel anggrianto
@danggrianto
so we need to use fully android=new UiSelector().resourceId("com.eliasnogueira.trianguloapp:id/txtLado1")
Pablillo Calvo
@pjcalvo
that is how I did it, but it was a native app instead of an hybrid one. What technology are u using?
daniel anggrianto
@danggrianto
hybrid app build with java calling vue site.
Wim Selles
@wswebcreation

@danggrianto

You need to switch context and switch to the webview to be able to use CSS selectors which you normally would use on websites

2 replies
Tanu
@Tanu51859628_twitter
image.png
Hi, I see these options in the wdio.conf.js " onReload: function(oldSessionId, newSessionId)" . How can I use these capabilities to inject newSession=('xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx') in my chrome browser after the session is created.
Or Can I use DevTool Services to set newSessionid?
Martijn Kuhlemeier
@martijnhjk
hello all! Quick question, Im exploring v6 and I noticed this log in the console Warning! Unsupported expect lib is used.
im a bit surprised because I am using Chai and https://webdriver.io/blog/2020/03/26/webdriverio-v6-released.html clearly states "If you already use an assertion library like Chai you can continue doing"
I'm setting expect globally by require('chai/register-expect');