Where communities thrive

  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
Repo info
  • 19:59
    Bartleonid commented #5043
  • 07:01
    praveendvd edited #7174
  • 07:00
    praveendvd opened #7174
  • 06:48
    praveendvd commented #7140
  • 03:13
    BlackSwan2019 commented #7146
  • Jul 23 20:44
    subashinih commented #3981
  • Jul 23 15:33
    christian-bromann commented #6777
  • Jul 23 14:25
    sbley commented #6777
  • Jul 23 13:01
    chaitrashekar21 commented #7173
  • Jul 23 12:11

    christian-bromann on cb-async-docs

    Update website/docs/SyncVsAsync… (compare)

  • Jul 23 12:11
    christian-bromann synchronize #6987
  • Jul 23 10:45
    PetrKnedlik commented #4482
  • Jul 23 08:48
    platon023 commented #7042
  • Jul 23 08:31
    martindzejky commented #6440
  • Jul 23 06:02
    subashinih commented #3981
  • Jul 22 20:48
    blane1988 commented #7146
  • Jul 22 20:46
    christian-bromann closed #7146
  • Jul 22 20:46
    christian-bromann commented #7146
  • Jul 22 20:46
    christian-bromann labeled #7173
  • Jul 22 20:46
    christian-bromann labeled #7173
Samavedam Bharadwaj
Any idea
Christian Bromann
@bharadwajsamavedam:matrix.org you have to provide the full error message
Marijana Rukavina

Hello, I am using webdriverIO v7 and cucumber to test my application. When running tests in headless mode or non headless mode results in error: java.net.ConnectException: Connection refused: connect Some scenarios pass but in some fail with that error.
This is stack trace:

unknown error: java.net.ConnectException: Connection refused: connect
    at Object.getErrorFromResponseBody (C:\my-project\node_modules\webdriver\build\utils.js:189:12)
    at WebDriverRequest._request (C:\my-project\node_modules\webdriver\build\request.js:168:31)
    at runMicrotasks (<anonymous>)
    at processTicksAndRejections (internal/process/task_queues.js:97:5)
    at Browser.runCommandWithHooks (C:\my-project\node_modules\@wdio\sync\build\wrapCommand.js:105:25)
    at Browser.runCommandWithHooks (C:\my-project\node_modules\@wdio\sync\build\wrapCommand.js:100:24)
    at Browser.url (C:\my-project\node_modules\@wdio\sync\build\wrapCommand.js:67:44)
    at MyPage.openImportPage (C:\my-project\src\pages\/myPage.js:32:17)
    at forEach (C:\my-project\src\helpers\/helpers.js:60:21)
    at Array.forEach (<anonymous>)
    at Helpers.deleteWishLists (C:\my-project\src\helpers\/helpers.js:55:51)
    at World.<anonymous> (C:\my-project\src\step_definitions\/config_steps.js:28:13)
    at World.executeSync (C:\my-project\node_modules\@wdio\sync\build\index.js:38:22)
    at World.executeSync (C:\my-project\node_modules\@wdio\sync\build\index.js:52:38)
    at C:\my-project\node_modules\@wdio\sync\build\index.js:69:68

Any ideas what the issue might be? Thanks!

Hi all, I have a question:
We have a package, that I want to add code coverage. But we don't have any application for the package, we wrote many tests, used WDIO (not unit tests)
I tried to use wdio-coverage-service, but received 0% coverage, also tried to use intanbul as is, but received again 0%.
Could anybody can help me?
Raziel Alron

Hi there, I am trying to send an API via axios.
I am using wdio v7 and sync mode.
I have a class that wraps onto axios to send API calls.
I get undefined when doing this through my axios class wrapper,
but when executing an API call through axios explicitly from the test it works, here is an example of what does work:

it('API call', async () => {
    resp = await browser.call(() => axios(request));
    console.log(resp); //resp is not a promise since I used await

I have a question regarding this code, why without browser.call() this code doesn't work?
this is the example code that does NOT work:

it('API call', async () => {
    resp = await browser.call(() => axiosWrapperFunction(request)); //this function calls axios inside her

so since this didn't really work, I thought maybe I need to add the browser.call() only on the API call itself, so I added it to the axios call inside the function wrapper and it didn't work.
can someone help with this and why do I need this browser.call() why can't I just use async/await?

Erwin Heitzman
Because you are using sync mode to start with. You can use async functions and tell wdio to wait till they are resolved in your test (the endpoint of the chain of promises) by using the call command as described in the documentation @razielron
1 reply
@AlexeyCL I suggest using the Devtools protocol to generate code coverage, you can find more about code coverage in our documentation
Hello everybody! Please tell me, I select the input $ ('. Input') element with audio, do addValue for it and then do the same actions, but 3 files are loaded, the feeling that the input is not cleared
Raziel Alron
use setValue instead
an error occurs element is not interactable
Raziel Alron
can you share the code you are using to do that?
let input = $('.input');
4 replies
and then repeat

Hi there, which js function i can trigger to execute the test instead of using npx wdio conf.js through terminal

I was trying something like

const wdio = require("@wdio/cli");
await wdio.run(config);
but got the following
not sure if what i should pass inside .run()
Hi Guys need your help I am using Cucumber + WebdriverIO v7 surprisingly
Then('I wait for {string} to not displayed', (elementInfo) => {
is recognized but when we are specifying like this
Then('I wait for {string} to (be|not) (clickable|displayed|enabled|exist)', (elementInfo, falseCase, condition) => {
It's not recognized getting following error Step "I wait for "SpinnerImage" to not displayed" is not defined. You can ignore this error by setting cucumberOpts.ignoreUndefinedDefinitions as true
Can anyone please help, I am having difficult time to understand what I am missing here ?
@karpitgupta well, I am assuming you have accounted for that use case -- IE you have some step that should be running for that combination of arguments?
@cpeck-bi May I know what I am missing here ?
I don't have any other step, I am in phase of building the things
what does the step definition code look like, if you can share?
Here it's

Then('I wait for {string} to (be|not) (clickable|displayed|enabled|exist)', (elementInfo, falseCase, condition) => {

let selector = lib.getSelector(elementInfo);
console.log("elementInfo : " + elementInfo);
console.log("falseCase : " + falseCase);
console.log("condition : " + condition);
lib.waitFor(selector, waitTimeout, true, `Timeout Occur : Spinner is displayed even after ${waitTimeout} ms`);


@cpeck-bi FYI
Here is the step in my feature file :
Then I wait for "SpinnerImage" to not displayed
However It works if I specify step like this : Then('I wait for {string} to not displayed', (elementInfo) => {
how long is the waitTimeout generallly?
It's 20000 ms
even If I comment lib.waitFor statement still step is not recognizable
@cpeck-bi Any idea what I am missing here ?
For me it looks so strange
you're not actually using the condition parameter are you?
or the falseCase?
I am using

@Amrkamel1 you can find the syntax here https://webdriver.io/docs/clioptions/#run-the-test-runner-programmatically

thank you so much its working now

Johnson E
Hi, can someone help me with this issue please? https://github.com/webdriverio/webdriverio/discussions/6688

Copying this problem here:

We are using browser.mock() to spy on non XHR calls and we have situation where we need to do a browser.sessionReload() which causes browser.mock() to stop working on any new window opened. Is this is expected? And is there a workaround to this? We cant use clearCookies() as we have multiple applications and the clearing cookies at the end only clears cookies of the last opened domain.

Raziel Alron
does anyone knows which version of Jasmine does wdio uses?

My team keeps running into performance metrics errors when trying test the loading of an image gallery that first requires authentication first. The actual error is

[0-0] LHError in "Testing the performance of a specific core library gallery with 50 assets. Should open and get the performance metrics from core library gallery with 50 assets" LHError: NO_TTI_NETWORK_IDLE_PERIOD at Function.findOverlappingQuietPeriods (/Users/tree/Git_Repositories/performance/node_modules/lighthouse/lighthouse-core/computed/metrics/interactive.js:136:11) at Function.computeObservedMetric (/Users/tree/Git_Repositories/performance/node_modules/lighthouse/lighthouse-core/computed/metrics/interactive.js:165:41) at Function.compute_ (/Users/tree/Git_Repositories/performance/node_modules/lighthouse/lighthouse-core/computed/metrics/metric.js:65:21) at Browser.next [as getMetrics] (/Users/tree/Git_Repositories/performance/node_modules/@wdio/utils/build/monad.js:95:33)

Does anyone have any help on this and what LHError or NO_TTI_NETWORK_IDLE_PERIOD means and how I adjust a rather simple metrics test? . My test couldn't be any simpler and the util metrics function is gathering all available metrics results the wdio performance audits offers

        const userVariables = tv.config.coreUserCredentials.

    after(function() {

    it('Should open and get the performance metrics from core library gallery with 50 assets', function () {
Erwin Heitzman
@razielron you can check the version in the package.json of the jasmine framework service
7 replies
@jonn-set someone already replied and asked the question with a good reason as this issue should probably be resolved in v7