Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • May 19 22:41

    christian-bromann on v8

    partially rewritten webdriverio… (compare)

  • May 19 22:40

    christian-bromann on v8

    rewrite @wdio/selenium-standalo… (compare)

  • May 19 16:18
    praveendvd synchronize #8156
  • May 19 13:34
    christian-bromann commented #8307
  • May 19 13:08
    NIBOSAP commented #8307
  • May 19 10:06

    christian-bromann on v8

    rewrite @wdio/sauce-service int… (compare)

  • May 19 09:28

    christian-bromann on v8

    rewrite @wdio/runner package to… rewrite @wdio/local-runner (compare)

  • May 19 09:06
    linux-foundation-easycla[bot] commented #8334
  • May 19 07:15

    christian-bromann on v8

    rewrite repl package to esm (compare)

  • May 18 23:17

    christian-bromann on v8

    rewrite junit reporter to esm (compare)

  • May 18 22:57

    christian-bromann on v8

    rewrite firefox-profile service… (compare)

  • May 18 22:49

    christian-bromann on v8

    rewrite dot reporter to esm (compare)

  • May 18 20:46
    christian-bromann commented #8307
  • May 18 16:22
    mayankshukla94 commented #8148
  • May 18 16:21
    anilreddy commented #8148
  • May 18 15:43
    mayankshukla94 commented #8148
  • May 18 14:47
    RyanGosden commented #8356
  • May 18 14:43
    christian-bromann unlabeled #8356
  • May 18 14:43
    christian-bromann labeled #8356
  • May 18 14:43
    christian-bromann commented #8356
Mircea Rosioru
@MirceaRosioru_twitter
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
2 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');
is Chai not compatible with v6?
Djamal
@djamknacker_twitter

Hello here.
Updated my project from wdio v5 to v6 and faced with problem when running tests remotely on selenium grid.
Even if I set hostname: , port: , and path: , in wdio.conf tests are running on my machine.
Who knows if there were any config changes or maybe I need to add something else now in v6 to be able to run tests on remote selenium grid machine?

P.S> even if I set absolutely incorrect hostname in config -> it still launch browsers on my local machine. 😅

3 replies
crazy-reva
@crazy-reva
Hi All, I have been trying to do performance testing using wdio , I have followed the steps on to integrate chromedriver,devtools service in my project to run the tests, I am seeing the below error "browser.getMetrics() is not a function". Can anyone help me on how to resolve this issue? Thanks in advance!
Divya Seshadri
@divya_seshi_twitter
Hi everyone, Im new to the coding world and Im trying to automate our webpage for official purposes. Im trying to upload a file in import field but no luck. I tried the following commands --> setValue, chooseFile, uploadFile, addValue but nothing helped. Could someone help me on this? PS: Using macOs, node version - v12.16.1.
Pascal König
@pako88
@divya_seshi_twitter take a look here: https://webdriver.io/blog/2019/06/25/file-upload.html
Divya Seshadri
@divya_seshi_twitter
@pako88 Thank you for the response. I have tried that too. It isn't working for me.
1 reply
Pascal König
@pako88
@divya_seshi_twitter is you webpage in the internet? i can take a quick look at it
Javier
@javiergarciacotado
hello
fyi
I have opened an issue on github: webdriverio/webdriverio#5441