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
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
  • 6,436
  • 1
  • 25
  • 47
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
  • 15,352
  • 12
  • 75
  • 134
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
  • 2,575
  • 4
  • 26
  • 54
6
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,669
  • 6
  • 27
  • 44
6
votes
1 answer

How to simulate ctrl-click or shift-click with webdriver.io?

With webdriver.io I would like to simulate clicks with a modifier like shift or ctrl. The keys() method seems to do something like that but it's not clear to me how to release a modifier key again and it throws an error when I use 16 (key code for…
Sandro
  • 1,551
  • 1
  • 17
  • 26
5
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
  • 65
  • 4
5
votes
2 answers

Create a selenium backend in a jenkins pipeline

I have a set of webdriver.io tests that are run in jenkins. They run against a selenium grid that is managed in k8s by an external company. I would like to have more control over my selenium backend, so I am trying to find a way to set up a selenium…
Martijn
  • 168
  • 2
  • 17
5
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…
5
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…
5
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
  • 362
  • 2
  • 12
5
votes
0 answers

Browsermob Proxy with WebdriverIO and Selenium

I'm attempting to record network traffic in a har file using selenium, webdriver io and browsermob proxy var webdriverio = require('webdriverio'); var Proxy = require('browsermob-proxy').Proxy , fs = require('fs') , proxy = new…
lfender6445
  • 25,940
  • 9
  • 95
  • 82
5
votes
1 answer

Install multiple typescript type definitions declaring the same global variable

I'm building an application using typescript, node and electron. I'm using jquery in the application and I've installed the @types/jquery package to have intellisense hints. Next I created a test using mocha and spectron. Spectron makes use of…
Mic
  • 372
  • 3
  • 11
5
votes
2 answers

Q: CodeceptJS "unknown error": call function result missing 'value'

This is my Test Feature('Test'); Scenario('test something', (I) => { I.amOnPage(""); I.see("Welcome"); I.fillField('j_username', 'xxxxxx'); I.wait(3); }); This is my codeceptjs.JSON { "tests":…
5
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…
1
2
3
85 86