Questions tagged [wdio]

121 questions
3
votes
2 answers

Webdriver.IO[7] : SwitchToFrame with css selector is not working

I want to click web element inside the iframe and trying to switch to respective iframe before clicking to web element. browser.switchToFrame(number) - switch to iframe with number is working but unable switch to iframe with css selector. I have…
3
votes
0 answers

Getting prepare Hook error while trying to run test cases using appium

2022-06-20T10:22:26.412Z INFO @wdio/cli:launcher: Run onPrepare hook 2022-06-20T10:23:22.099Z ERROR @wdio/cli:utils: A service failed in the 'onPrepare' hook Error: Appium exited before timeout (exit code: 1) at ChildProcess.
2
votes
1 answer

How to assert Url of new tab with WDIO

My test scenario is that: You go to url1 you click button you open another tab with url2 How to I assert the url2? I use assert(browser).toHaveUrlContaining('') But it assert the url1, so my test was fail
2
votes
2 answers

Cannot find type definition file for '@wdio/globals/types'

I am using webdriverio mocha framework with typescript. @wdio/cli": "^7.25.0" NodeJs v16.13.2 NPM V8.1.2 I am getting below error at tsconfig.json JSON schema for the TypeScript compiler's configuration file Cannot find type definition file for…
2
votes
0 answers

APPIUM: Open expo with URL argument without DeepLinking

In my current project we open Expo through safari using DeepLink. I was wondering if it is possible to open Expo and directly pass URL argument, skipping safari step. Something Like this await driver.execute('mobile: launchApp', {bundleId:…
Olga
  • 73
  • 1
  • 8
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
1 answer

In WDIO, what makes the Spec Reporter report a question mark?

Whilst running WDIO tests on the command line (using Spec reporter), on one test run, I managed to make it report a '?" in the command line output. Something like this: [Chrome 100.0.4896.60 darwin #0-0] ✖ test1 [Chrome 100.0.4896.60 darwin #0-0]…
2
votes
4 answers

Appium Wdio not run = ERROR webdriver: RequestError: connect ECONNREFUSED ::1:4723

Run npx wdio and not run ı more try but ı did not PLease help me this issue always My caps capabilities: [{ platformName: "Android", "appium:deviceName": "emulator-5554", "appium:automationName": "UIAutomator2", "appium:app":…
furkan ece
  • 21
  • 1
  • 2
1
vote
1 answer

"ERROR @wdio/cli:utils: A service failed in the 'onPrepare'" hook when running local mobile auto tests

I'm a beginner, so therefore do not judge strictly for extra information This is package.json: { "name": "my-new-project", "type": "module", "devDependencies": { "@wdio/appium-service": "^8.11.2", "@wdio/cli": "^8.11.2", …
A. K.
  • 13
  • 2
1
vote
0 answers

WebDriverIO - Delete Native App storage and cache for Android and iOS using Appium

We are using WDIO to automate Android and iOS tests. Is there a way to delete the application storage and cache. The method like resetApp() does not seem to be available. The tech stack is Typescript, Appium and WDIO
AFTAB MANNAN
  • 11
  • 1
  • 3
1
vote
3 answers

How to configure usage of Browserstack Observability for Appium without a wdio.conf.ts file?

In our Appium test automation project, we have a customized configuration that does not use the default wdio.conf.ts file. So far we did not encounter any issues with this: the driver configuration is set up in a separate class and tests run as…
Tybs
  • 512
  • 4
  • 23
1
vote
0 answers

How do I set up WebdriverIO and Appium with Typescript to test an Android application using MaterialUI?

This is my first post on here (ever), so please bear with me if I don't supply all of the necessary information (I will always edit to add more information as required). I am new to QA, especially automation testing. I have a Typescript (v4.9.5)…
mdexter1
  • 11
  • 3
1
vote
1 answer

Why does the terminal error prefix the file with an underscore _

I have a file /test/email/email.js: export default class verificationEmail { constructor() { var Imap = require('imap'), inspect = require('util').inspect var imap = new Imap({ user: 'wdio@example.com', …
Steve
  • 2,066
  • 13
  • 60
  • 115
1
vote
2 answers

How can I find some value in the html and store it in a variable?

I have part of code: await fetch(request) .then((response) => { if (response.status === 200) { console.log("Success"); result = response.text(); } else { throw new Error("Something went wrong…
Evgeniya
  • 13
  • 5
1
vote
0 answers

Webdriverio- Cucumber: spec array executes every tests multiple times

I have 3 tests file, i want to run 2 in single instance one after another in same session, so i have created the spec array in wdio.conf.js it looks like this: specs: [ "./test/specs/features/login/login.feature", [ …
Mahadev Gouda
  • 769
  • 11
  • 14
1
2 3
8 9