Questions tagged [webdriver-io]

WebdriverIO from webdriver.io is a JavaScript library for controlling browsers with Selenium server via the WebDriver API.

WebdriverIO is an independent implementation of the WebDriver Protocol which provides language bindings and APIs to automate browser or mobile devices. Its test runner allows you to write your tests in a synchronous way so you’re not constantly in the world of asynchronous coding. WebDriverIO integrates easily with a variety of cloud browser testing vendors (for example, Sauce Labs, BrowserStack and CrossBrowserTesting), so you can perform tests on a wide variety of OS/Device/Browser combinations, all from one test.

1276 questions
52
votes
2 answers

What is the difference between NightwatchJS and WebdriverIO?

As the title states, what is the difference between Nightwatch.js and Webdriver.io? It seems like they have kind of the same syntax and do almost the same thing. How are they different? I need to choose between them.
Presidenten
  • 5,917
  • 11
  • 43
  • 52
14
votes
1 answer

JEST: "Async callback was not invoked within the 5000ms timeout specified by jest.setTimeout.", despite it being already configured

Before you point it out, yes, I know this seems like a likely duplicate of multiple questions like; JEST: Async callback was not invoked within the 5000ms timeout specified by jest.setTimeout Got Timeout - Async callback was not invoked within the…
sgarcia.dev
  • 4,375
  • 11
  • 33
  • 57
13
votes
2 answers

WebdriverIO Vs Selenium Webdriver (Java Approach)

Any feedback on WebdriverIO vs Selenium with Java? I am in a dilemma and wanted to clear up this confusion. I have spent a few days learning WebdriverIO and also did some hands-on but reached the conclusion that it is not mature enough. Debugging is…
user3559569
  • 199
  • 2
  • 2
  • 7
12
votes
4 answers

Finding a parent element in webdriver.io

I've seen a couple of solutions in the original webdriver that use getAttribute('xpath') and append to that '/..' but webdriver.io doesn't have an xpath attribute so I haven't been able to use that. Any ideas on how to grab the parent element? The…
Ben Hernandez
  • 787
  • 10
  • 21
11
votes
2 answers

How to inherit from WebElement in WebdriverIO

I looking for a way to inherit from WebElement object that webdriverio returns, without monkey-patching and with TS types support (autocompletion is a must). Is there a way to do something like this? class Checkbox extends WebdriverIOWebElement { …
8
votes
5 answers

Webdriver.io/Selenium tests fail when the window is in the background on Chrome 87

I've just upgraded to the latest version of Chrome 87. My Webdriver.io/Selenium tests used to run fine regardless of if the Chrome window was in the foreground or the background. Now, after upgrading, the tests pass if the window is in the…
Ryan Shillington
  • 15,463
  • 10
  • 75
  • 85
8
votes
1 answer

org.openqa.selenium.TimeoutException when loading angular SPA

I'm using chimp.js which enhances webdriver.io with some fibers magic so that the code can be defined in a synchronous way. This is the code: var c = require('./config'); module.exports = function () { this.When(/^I try to login with wrong…
peter
  • 11,751
  • 6
  • 52
  • 89
7
votes
0 answers

Unable to launch Debugging for a "npx" launched App in visual studio code

I need to launch a particular .js file for execution, in this way: npx app.js launch.conf.js //for execution of scripts npx app.js debug.conf.js //for debugging the scripts In my debug.conf.js contains const config = { debug: true, execArgv:…
7
votes
5 answers

Selenium server error: Unable to create new service chromedriverservice

I am trying to run webdriverio on my windows 10 computer and keep running into the same issue when trying to run my test js file. So I run this -jar /your/download/directory/selenium-server-standalone-3.5.3.jar to start the server and that comes…
Planet_Man
  • 81
  • 1
  • 1
  • 4
7
votes
2 answers

How to Try Catch in CodeceptJS

I'm doing this in my page object: try{ I.selectOption(this.SELECT, this.OPTION); } catch(error){ I.say('Option missing, but thats sometimes expected ' + error); } But it still fails the test when the locator doesn't match an option element.…
Dingredient
  • 2,011
  • 17
  • 46
7
votes
5 answers

WebdriverIO: How to read baseURL value from wdio.conf.js. inside step definition file

I am using WebdriverIO for test automation. In wdio.conf.js file I have configured the 'baseUrl' property. I want to read the 'baseUrl' property value inside my test .js file. How can I do this?
7
votes
1 answer

Fibers/node-gyp hanging on Yarn install on Windows

Looks like wdio has fibers as a dependency, which uses node-gyp, which apparently won't run on Windows without Python 2.7. Now that I have that installed, I don't get the "missing PYTHON" error, but it hangs forever on whatever that command is…
antonpug
  • 11,964
  • 27
  • 76
  • 120
7
votes
2 answers

Losing webdriverio session when testing electron app restart using spectron

I'm using spectron to run integration tests against my electron app. Everything is working fine apart from attempting to test that app settings are persisted properly between app restarts. While running tests, my app starts up with new temporary…
Tim
  • 6,485
  • 2
  • 42
  • 81
7
votes
4 answers

WebDriverIO Selenium pass command line arguments into Chrome from config.js file

I need chrome to run with disable-web-security flag for my UI tests. How can I inject any commands using wdio.config file (http://webdriver.io/). capabilities: [{ browserName: 'chrome' }]
6
votes
1 answer

How to Wait for Ajax calls to complete for WEbdriver.io

I am trying to figure out how to make webdriver.io wait until all ajax requests have finished after clicking a button. Unfortunately the document.readyState is always = 'complete' , and there is nothing "unique" about the webpage except that it has…
Martin Thompson
  • 2,190
  • 4
  • 23
  • 48
1
2 3
85 86