Questions tagged [wdio-v6]

45 questions
4
votes
1 answer

Webdriver.io (wdio) - Browserstack - waitforDisplayed fails

I'm working on some tests with wdio 6 (on my way to upgrade it to 7) and I've been receiving this error on a very simple test it('Renders unit list', () => { $('.unit-list .bookable-unit-details:first-child').waitForDisplayed(); …
MikeVelazco
  • 885
  • 2
  • 13
  • 30
4
votes
2 answers

WebdriverIO and Angular, writing e2e tests in typescript that import classes (Cannot use import statement outside a module)

I am trying to get a wdio set of e2e tests working. Some of the tests use some utility classes written in typescript. When the test is being compiled it is falling over this error: Spec file(s):…
Rob Gansevles
  • 143
  • 1
  • 10
2
votes
1 answer

Accessing arguments/parameters of an Allure report during execution?

In the testing framework we are using allures .addArgument method to add a parameter to the report for the name of team which owns a particular test. AllureReporter.addArgument('teamName', 'myTeam');. Many tests have already been written, some with…
DublinDev
  • 2,318
  • 2
  • 8
  • 31
2
votes
0 answers

WebDriverIO - Error switching to iframe in Salesforce application (WDIO v7, Chrome Browser v96.0.4664.45)

We had written a test using WDIO, which was executing as expected on Chrome browser v95.X. With Chrome browser upgrading to v96.0.4664.45, the test has started failing throwing an error. Detail as below: Line: await browser.switchToFrame(await…
SOFUser
  • 21
  • 2
2
votes
1 answer

type ‘(v1: number, callback: Function) => Promise' is not assignable to parameter of type 'string | ((arguments_0: number) => void)'

After updating from wdio v5 to wdio v6 (6.11.0 with "typescript": "^4.2.2"), I started getting the below error on browser.executeAsync(runCheck, v1) error TS2345: Argument of type ‘(v1: number, callback: Function) => Promise' is not…
Claire
  • 23
  • 5
1
vote
2 answers

Why we use await in front of wdio commands $ and $$

I am beginner to wdio(version 7 onwards). My question is why we put await in front of $(...) or $$(...) commands? $ and $$ retuns element object and array of elements respectively. Then why we use await in front of them? Are they returning…
a Learner
  • 4,944
  • 10
  • 53
  • 89
1
vote
0 answers

WebdriverIO - Running tests in gitlab

I am trying to run my tests in the gitlab pipeline and I keep getting the same error: Here is my yml: stages: - setup - test setup: stage: setup image: node:latest services: - name:…
1
vote
1 answer

How to click input type=radio in webdriverIO

I'm trying to write some tests using WDIO but stumble on the following issue. I don't really understand how to click() input type=radio. Here how it looks in DOM So I need to click the right one. I found it with $([id="all"]) and after waiting…
1
vote
1 answer

how to navigate from feature file to step definition file in VS

how can I navigate from feature file (cucumber framework) to step definition file in WDIO in Visual studio Code. I have installed all the plugins(Cucumber (Gherkin) Full Support v2.15.1,cucumber-gotostep v0.0.4)
1
vote
1 answer

WebdriverIO - Execute some tests consecutively and other tests in parallel

I have a WDIO project that has many tests. Some tests need to be run consecutively while other tests can run in parallel. I cannot run all tests in parallel because the tests that need to be run consecutively will fail, and I cannot run all tests…
Brian
  • 135
  • 4
  • 16
1
vote
1 answer

Sauce service doesn't work with mobile tests

I am using sauce-service package to send names of tests (feature files) and see them on Sauce Labs, everything is working fine when I am using web tests but unfortunately when I try to set mobile config it doesn't seem to work. What I am missing? My…
beauvoir
  • 67
  • 1
  • 9
1
vote
2 answers

WebdriverIO - How to add custom headers to all requests

I need to add custom headers to all requests in order to access the web app which is normally hidden behind corporate proxy and vpn and be able to run E2E tests. As an automation tool we user WebdriverIO. So far I tried to set up custom header in…
1
vote
1 answer

How I can pull data from a Cucumber table in Javascript?

I want to perform a test case where I'm trying to login with different credentials and check the error message. How this can be done in Cucumber? Feature: Login Login Test Suite Background: Given I'm on the login page Scenario: 01. Should not…
user15281199
1
vote
1 answer

Why do webdriverIO functions are not working in wdio-v7?

I have just started a new project using wdio-v7, but none of the webdriverIO functions (e.g.: .click(), .waitForDisplayed()) are working anymore and I receive "TypeError: element.click is not a function"
1
vote
0 answers

How to declare a nodejs global variable to avoid race condition between proceses

Question: How can I declare a Nodejs global variable that gets updated multiple times in a session for a process? I am using this global variable in multiple processes. And wants to keep the data of this global variable separated between the…
Xat
  • 127
  • 1
  • 3
  • 10
1
2 3