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.

1803 questions
7
votes
2 answers

setting up Jasmine + Webdriver - "cannot use import outside a module"

I'm trying to set up a basic automated test in the browser against a react app, using webdriver and Jasmine. I'm using page object models to describe my app under test, like so: Example page object from JasmineBDD I'm running Jasmine fine, and…
7
votes
1 answer

Webdriverio Error on Window10 basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')") ^^^^^^^ SyntaxError: missing ) after argument list

When i try to run npm run then i got below error I am using below configuration : webdriverio v4.14.4 node v8.5 npm v5.3 Windows 10 below is my config file "scripts":{ "web": "node node_modules/.bin/wdio…
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
  • 13,724
  • 28
  • 88
  • 129
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
  • 7,746
  • 3
  • 49
  • 83
7
votes
3 answers

Second test doesnt change URL

I have two test. The first test passes successfully. Then there is an url method call in the second test, but it doesn't change the url in the browser. The baseUrl in wdio.conf.js is set to http://localhost/web/es/index.html# Tests: var assert =…
user49126
  • 1,825
  • 7
  • 30
  • 53
6
votes
1 answer

How to Assert a array contains a sub string in JavaScript/TScript

I am trying to check a SubString exists in an array. In the Test i am asserting using: expect(classList).toContain('Rail__focused') I am getting the following error: Error: expect(received).toContain(expected // indexOf Expected value:…
MNB
  • 75
  • 1
  • 6
6
votes
3 answers

Appium - How to scroll down using UiAutomator2 and WebdriverIO with React Native (Android) and JavaScript

No matter what I try, I am unable to get my React Native (Android) app to scroll down using Appium. I am using UiAutomator2 and WebdriverIO. My code looks like this: scrollUntilDisplayed(element: WebdriverIO.Element) { const dimensions =…
6
votes
1 answer

Webdriverio TypeError: element.click is not a function

async function t(e){ return e; } async getByResourceId(id, wait= 5000){ const elm = this.driver.$('android=new UiSelector().resourceId("'+id+'")'); const telm = await t(elm); } I am trying to automate a android app with appium…
Gilad Shnoor
  • 374
  • 3
  • 12
6
votes
2 answers

Set Custom Error Message for Assert (Node.js)

I'm lost in the Node documentation and I'm having difficulties figuring out how I could create a custom (or modify the existing) error handling for all of my assert statements, without having to include individual messages with each assertion. const…
Doug
  • 1,435
  • 1
  • 12
  • 26
6
votes
2 answers

WebdriverIO browser.click gives error "Other element would receive the click". How do I fix?

I am getting the following error from my webdriverIO selenium code when I try to run it: Failed: unknown error: Element is not clickable at point (389, 709). Other element would receive the click: < html lang="en" >...< /html > here's the…
6
votes
2 answers

How to upload a file using WebdriverIO

I'm trying to port the following code from Ruby with the selenium-webdriver gem to Node.js with WebdriverIO: @webdriver.navigate.to "https://imgur.com/upload" element = @webdriver.find_element(:id,…
Adam Cooper
  • 8,077
  • 2
  • 33
  • 51
6
votes
2 answers

Using ChromeDriver with WebDriverIO without Selenium

I want to drive my webdriverio tests with ChromeDriver, without going by Selenium. That should be possible, it seems, but I am not sure where to start. I have tried starting up ChromeDriver like this chromedriver and then in another Window I have…
oligofren
  • 20,744
  • 16
  • 93
  • 180
6
votes
1 answer

Avoid re-entering user/email and password with WebdriverIO in login form

I want to optimize my WebdriverIO tests. I'm trying to avoid to re-entering the username & password when I run a test suite with WebdriverIO. (Chromedriver) The following two files are part of one module, and there are 4 modules in total. First…
6
votes
3 answers

browser.keys() is not working on Firefox 53.0 & webdriver.io

On firefox, browser.keys throwing error. Os: MacOs Firefox version: 53.0.3 Geckodriver: 0.16.1 Webdriver.io: 4.8 Please help me how to deal with this error. Here are the logs [17:11:35] COMMAND POST …
6
votes
6 answers

wedriverio jenkins - npm command not found error

I am trying to run webdriverio test from jenkins and following this . I installed nodeJS plugin for jenkins and under global tool config, for NodeJS , added a name and installation directory as /usr/local/bin (node executable is in this folder) In…
user1207289
  • 3,060
  • 6
  • 30
  • 66