Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • 09:45
    christian-bromann synchronize #6832
  • 09:45

    christian-bromann on cb-reload-devtools-session

    fix unit tests (compare)

  • 09:35
    christian-bromann closed #6405
  • 09:35
    christian-bromann commented #6405
  • 09:35
    christian-bromann review_requested #6832
  • 09:35
    christian-bromann labeled #6832
  • 09:35
    christian-bromann opened #6832
  • 09:32

    christian-bromann on cb-reload-devtools-session

    fix reloading devtools session (compare)

  • 08:36
    christian-bromann assigned #6405
  • 08:36
    christian-bromann unlabeled #6405
  • 08:36
    christian-bromann unlabeled #6405
  • 08:20
    christian-bromann commented #6786
  • May 05 21:47

    christian-bromann on npm_and_yarn

    (compare)

  • May 05 21:47

    christian-bromann on main

    Bump aws-sdk from 2.900.0 to 2.… (compare)

  • May 05 21:47
    christian-bromann closed #6826
  • May 05 21:36
    dependabot[bot] labeled #6826
  • May 05 21:36

    dependabot[bot] on npm_and_yarn

    Bump aws-sdk from 2.900.0 to 2.… (compare)

  • May 05 21:36
    dependabot[bot] opened #6826
  • May 05 21:23
    dependabot[bot] edited #6819
  • May 05 21:23
    dependabot[bot] edited #6820
Christian Bromann
@christian-bromann
maybe try --mochaOpts.grep="smoke"
colleenquist
@colleenquist
I have tried that already, unfortunately
Christian Bromann
@christian-bromann
Mhm .. not sure
colleenquist
@colleenquist
I've tried several variations on that theme, I've also tried using the recursive option in case my project's directory structure was a problem
Frank S.
@fspinillo
[0-0] 2021-05-04T15:47:42.196Z INFO webdriver: COMMAND enablePerformanceAudits() [0-0] 2021-05-04T15:47:42.197Z INFO webdriver: RESULT undefined is there a way to identify why this is happening? it seems like devtools keeps working but it results in me not being able to call getMetrics
Frank S.
@fspinillo
Think i found my issue. Our page is doing a lot of redirects and i think it's causing issues with the audit recording
Thomas Carlsson
@th0car
I'm using @wdio/devtools-service and the emulateDevice function to change userAgent for a specific spec. It works like charm when running it locally using chromedriver (and I can see the effects of the useragent being set) but the same test then fails when executing to a Selenium grid. Error: TypeError: browser.emulateDevice is not a function
Chrome version both locally and on grid is 90 and I am using Selenium Grid 4 beta 3 - Any clue on what might cause this problem or what to try to fix it?
9 replies
Frank S.
@fspinillo
do webdriverIO's global configuration's work with browserstack? I have something set up in a before in my wdio.config file but it's not being called when used with browserstack
Christian Bromann
@christian-bromann
it should as it doesn’t matter if it runs in BS or locally
Frank S.
@fspinillo
I kept it simple and just did a browser.url('https://www.google.com) and it doesn't seem to get called. Going to bump my versions and check. if not I'll open a ticket on the repo
anotheruser584
@anotheruser584

Hi! Can somebody share an example on how to implement a builder pattern in async code? The issue is that I'm heavily using page objects with chainable methods in my project:

LoginPage
    .open()
    .setUsername(username)
    .setPassword(password)
    .clickSubmit();

Now when sync mode is dead I'm struggling to re-write this to async manner...
This no longer works (e.g. async setPassword(password: string) { await (await this.inputPassword).setValue(password); return this; }) since every method now returns a promise

I'm ok with making some verbose changes inside my page object, because I don't want to re-write 600+ tests (The goal is to not change external API of the page objects so I can just add async LoginPage.open().setUsername()... etc.)
vinay383
@vinay383
Hi i am new in testing getting error $(...).setValue is not a function
2 replies
can someone help me why it is not able to find function setValue
shaytoMoonActive
@shaytoMoonActive

@christian-bromann

it should work this way, not sure, maybe browser.execute((el) => { el.style.display = ‘block' }, element)

i did this

               browser.execute('document.querySelector(`input[accept=".csv"]`).style.display = "block"');

and got the following error

javascript error: Cannot read property 'style' of null
@christian-bromann if i run this in the browser console it works
document.querySelector(`input[accept=".csv"]`).style.display = "block"
shaytoMoonActive
@shaytoMoonActive

@christian-bromann also tried this

browser.execute((el) => { el.style.display = 'block' }, element)

got the following error

javascript error: Cannot set property 'display' of undefined
kevin-longmate
@kevin-longmate
Within the 'onWorkerStart' hook there is a string 'cid' which gives the capability id eg. 0-0. Is there a way to access this same capability ID within other hooks like 'before' or 'after' does. anyone know?
1 reply
viktor-silakov
@viktor-silakov
can I make scenario failed via beforeScenario block and stop it running?
kevin-longmate
@kevin-longmate
@vinay383 do you have your ts config set up correctly? Read through https://webdriver.io/docs/typescript
kevin-longmate
@kevin-longmate

@viktor-silakov within https://webdriver.io/docs/configurationfile there is a setting

// If you only want to run your tests until a specific amount of tests have failed use
// bail (default is 0 - don't bail, run all tests).
bail: 0,

would that work for you if you set bail to 1?

viktor-silakov
@viktor-silakov
I don’t think that this helps^ i just want to stop scenario before running
When some precondition in hook failed
Arjan Blok
@ablok
I am trying to use wdio-firefox-profile-service and I can't get it to work. If I set the property "browser.startup.homepage", "https://webdriver.io"and I start a test with firefox, run a browser.debug() command and then manually open about:config in the opened session and check the value, it is just about:home. Should it be changed?
The plugin seems to do what it is supposed to, because if I look into the capabilities in the beforeSession I see a moz:firefoxOptions property which has a profile property with a base64 string. If I decode that to a file, it indeed contains the correct value for the browser.startup.homepage. It just doesn't seem to reflect in Firefox.
Pascal König
@pako88

anyone already tried chained locators in page objects in async mode?
i always get undefined for elem1 and don't get the await working - any ideas?

get elem1() { return $('div#top')}
get chainedElement() { return this.elem1.$('div')}
get chainedElementv2() { return $(${this.elem1.selector} div)}

Edmond Lepedus
@elepedus
Hi everyone, I'm having issues running my test suite in GitLab. It runs fine locally through chrome, but in GitLab I get Error: connect ECONNREFUSED 127.0.0.1:<random high port eg 39401> whenever I try to start a browser session. I'm running in a container that already has Chrome 90 installed, but I've also tried declaring selenium/standalone-chrome as a sidecar service. Any ideas?
2 replies
Pascal König
@pako88
even this isn't working on my end - i'm now going with async function instead of getters
Christian Bromann
@christian-bromann
@pako88 you would have to do it like this:
get chainedElement() { return this.elem1.then((el) => el.$('div')) }
Pascal König
@pako88
wow that worked - awesome @christian-bromann thanks
leon
@leon:nilsu.org
[m]
hi
Default
skamineni
@skamineni
Did anyone see allure is giving forbidden error lately
any solves for that ?
chenko
@Khromchenko
@skamineni No, didn't see anything related to allure failures
anl176
@anl176

Hi everyone. I'm trying to use webdriverio to test an iOS app that has a webview opened. When I try using getContexts I only see my native app ([ 'NATIVE_APP']) despite having the webivew open in the iOS app and being able to view it on Safari through the web inspector.

I'm new to iOS so I'm wondering if anyone knows from experience some configuration I need to do on the iOS side to make the webview accessible or some demo code. This webdriverio/appium-boilerplate#33 for example hints that Android apps need to be compiled in some debug mode though I haven't figured out yet if the same applies to iOS.

Gustavo Suarez
@gsuarez80
Hi all, I get the following error UnhandledPromiseRejectionWarning: TypeError: Cannot read property 'find' of undefined" when I try to set up "Hello World" test suite into my project by running: npx wdio config. I followed the instructions on the https://webdriver.io/docs/gettingstarted and still not able to get it to work. Can some one give me hand with? thanks
anl176
@anl176

Hi everyone. I'm trying to use webdriverio to test an iOS app that has a webview opened. When I try using getContexts I only see my native app ([ 'NATIVE_APP']) despite having the webivew open in the iOS app and being able to view it on Safari through the web inspector.

I'm new to iOS so I'm wondering if anyone knows from experience some configuration I need to do on the iOS side to make the webview accessible or some demo code. This webdriverio/appium-boilerplate#33 for example hints that Android apps need to be compiled in some debug mode though I haven't figured out yet if the same applies to iOS.

I was able to get my webview context to show by adding webviewConnectTimeout: "90000" to my capabilities

Dev
@Charan83

Hi
Im quite new to webdriverio, need some help
getting the below error, when trying to run tests from a container, against selenium grid (started using https://github.com/SeleniumHQ/docker-selenium/blob/trunk/docker-compose-v3.yml)

2021-05-06T03:56:29.669Z INFO @wdio/cli:launcher: Run onPrepare hook
2021-05-06T03:56:29.670Z ERROR @wdio/cli:utils: A service failed in the 'onPrepare' hook
TypeError: Cannot read property 'args' of undefined
at DockerLauncher.onPrepare
(/Users/dev/int/vc/pg-docker-compose/testapp/node_modules/wdio-docker-service/lib/launcher.js:30:9)
at /Users/dev/int/vc/pg-docker-compose/testapp/node_modules/@wdio/cli/build/utils.js:28:40
at Array.map (<anonymous>)
at Object.runServiceHook (/Users/dev/int/vc/pg-docker-compose/testapp/node_modules/@wdio/cli/build/utils.js:25:33)
at Launcher.run (/Users/dev/int/vc/pg-docker-compose/testapp/node_modules/@wdio/cli/build/launcher.js:94:27)

guruprasadsr2805
@guruprasadsr2805

Hi,

I am a newbie trying to learn WebDriverIO.
I am getting an error when I am trying to find the attribute value for an anchor tag.
Please see the package.json and my test file below.
Please help!!!

package.json - https://paste.gg/p/anonymous/9bcc9ef2f3114b2db75b84e644f4b650
example.js - https://paste.gg/p/anonymous/3da2c3db128441d884ed3ecff4feb9ef

kfir ben hamou
@kfirbhCS
Good morning
we are using selenium standalone service : 6.9.0 with wdio cli (sync)
we failed to execute when using ChromeDriver 90.0.4430.24 anyone faced that ?
Christian Bromann
@christian-bromann
@kfirbhCS you have to be a bit more descriptive what has failed
shaytoMoonActive
@shaytoMoonActive

@christian-bromann

it should work this way, not sure, maybe browser.execute((el) => { el.style.display = ‘block' }, element)

i have tried to print the element and got the following :

Promise { <pending> }

any idea why and how i solve it?

Christian Bromann
@christian-bromann
yes, use async await
Arjan Blok
@ablok

I am trying to use wdio-firefox-profile-service and I can't get it to work. If I set the property "browser.startup.homepage", "https://webdriver.io"and I start a test with firefox, run a browser.debug() command and then manually open about:config in the opened session and check the value, it is just about:home. Should it be changed?
The plugin seems to do what it is supposed to, because if I look into the capabilities in the beforeSession I see a moz:firefoxOptions property which has a profile property with a base64 string. If I decode that to a file, it indeed contains the correct value for the browser.startup.homepage. It just doesn't seem to reflect in Firefox.

With a local running geckodriver this works fine, however, when using a local grid (selenium-standalone-service) the profile config does not seem to be picked up. So there is a difference in using the same geckodriver via a grid or using it directly. Any ideas?

Kanstantsin Harbachou
@kongory
Does anybody know will my test with multiremote mode use modified wdio.conf on CI or not? I mean when I run tests on CI I automaticaly change hostname and path for browser instance, but it seems like multiremote mode doesn't use these changes and try to connect with browser using not-modified settings. How can I fix it?
kevin-longmate
@kevin-longmate

Do I need to do anything special to get webdriverIO to accept Appium capabilities? I'm getting an error when running

2021-05-06T08:17:01.039Z ERROR @wdio/runner: Error: Invalid or unsupported WebDriver capabilities found ("deviceName", "platformVersion"). Ensure to only use valid W3C WebDriver capabilities (see https://w3c.github.io/webdriver/#capabilities).

These are valid appium capabilities but not W3C capabilities. Does anyone know what I should do to get appium capabilities accepted?

Christian Bromann
@christian-bromann
use appium:deviceName
kevin-longmate
@kevin-longmate
that's great thanks a lot Chris!
dmarimoutou
@dmarimoutou
@kevin-longmate in my project I use (for iOS):
    "appium:deviceName": "my_device_name",
    "appium:platformVersion": "14.5",
    "appium:automationName": "XCUITest",
    "appium:app": "path_to_my_app",
kevin-longmate
@kevin-longmate
@dmarimoutou that does work thanks 😊