Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • 12:25
    EINBOX commented #7438
  • 12:21
    hzk007 commented #7444
  • 11:56
    EINBOX commented #7438
  • 11:50

    dependabot[bot] on npm_and_yarn

    (compare)

  • 11:50

    christian-bromann on main

    Bump @cucumber/messages from 16… (compare)

  • 11:50
    christian-bromann closed #7440
  • 11:49

    dependabot[bot] on npm_and_yarn

    (compare)

  • 11:49

    christian-bromann on main

    Bump @typescript-eslint/eslint-… (compare)

  • 11:49
    christian-bromann closed #7441
  • 11:49

    dependabot[bot] on npm_and_yarn

    (compare)

  • 11:49

    christian-bromann on main

    Bump aws-sdk from 2.987.0 to 2.… (compare)

  • 11:49
    christian-bromann closed #7447
  • 11:48
    christian-bromann reopened #7444
  • 11:48
    christian-bromann commented #7444
  • 11:47

    dependabot[bot] on npm_and_yarn

    (compare)

  • 11:47

    christian-bromann on main

    Bump jest-circus from 27.1.0 to… (compare)

  • 11:47
    christian-bromann closed #7448
  • 11:47

    dependabot[bot] on npm_and_yarn

    (compare)

  • 11:47

    christian-bromann on main

    Bump @typescript-eslint/parser … (compare)

  • 11:47
    christian-bromann closed #7449
techyguy78
@techyguy78
Thanks @erwinheitzman! RunnerStart and RunnerEnd generates report at spec file level, for 100 spec file in suite its challenge to get consolidated results
Erwin Heitzman
@erwinheitzman
@techyguy78 I think the idea is that you push the results in an array and then use the sync command to create/push your results
you can use this as a reference
or checkout any of the other reporters
another example, taken from the junit reporter:
    onRunnerEnd (runner: RunnerStats) {
        const xml = this._buildJunitXml(runner)
        this.write(xml)
    }
I should create my own reporter sometime soon so I can explain it well in the future hehe
techyguy78
@techyguy78
ah :-) , let me look into this @erwinheitzman Thank you!
bdlight2
@bdlight2

hello all,
when running the example wdio project generated through wdio config using selenium-standalone, jasmine framework, and running commands synchronous (making no changes) i get the following warning when each test starts and completes:

DEPRECATION: An asynchronous before/it/after function took a done callback but also returned a promise. This is not supported and will stop working in the future. Either remove the done callback (recommended) or change the function to not return a promise.

npm init and wdio config output: https://paste.gg/p/anonymous/c39026f3328645189ac202818f56102b
npm t output: https://paste.gg/p/anonymous/1d1a08a0a8804b1e9da6ef9437cd09b3

any idea what this is about? is this something i can fix or ignore?

an-austin-jones
@an-austin-jones
Hi I have a table where I scrollIntoView a cell, but it is sometimes covered by the header nav bar at the top. I know this is probably not the best way to do it but I want to overwrite the scrollIntoView command to use it, check if the element is clickable, if not, press up a few times on the browser to get it into view. My issue is I don't know how to get the element reference inside the function I pass into overwriteCommand in order to check isClickable. The examples I've seen do not have references to the element. How do I do that?
cpeck-bi
@cpeck-bi
@an-austin-jones have you looked into passing arguments to the scrollIntoView() function? I like to use scrollIntoView({block: "center"}) to vertically center the target element in view
Samavedam Bharadwaj
@bharadwajsamavedam:matrix.org
[m]
Unable to load spec files quite likely because they rely on browser object that is not fully initialised. I am getting err
error*
Any idea
Christian Bromann
@christian-bromann
@bharadwajsamavedam:matrix.org you have to provide the full error message
Marijana Rukavina
@mareru

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!

AlexeyKa
@AlexeyCL
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)
https://github.com/cloudinary/wdio-allure-ts
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
@razielron

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
    console.log(resp);
});

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
@erwinheitzman
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
Xatabch
@Xatabch
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
@razielron
use setValue instead
Xatabch
@Xatabch
an error occurs element is not interactable
Raziel Alron
@razielron
can you share the code you are using to do that?
Xatabch
@Xatabch
let input = $('.input');
browser.uploadFile(somePathToFile)
input.addValue(somePathToFile)
4 replies
and then repeat
Asalem
@Amrkamel1

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
image.png
not sure if what i should pass inside .run()
cpeck-bi
@cpeck-bi
krarpitgupta
@krarpitgupta
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 ?
cpeck-bi
@cpeck-bi
@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?
krarpitgupta
@krarpitgupta
@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
cpeck-bi
@cpeck-bi
what does the step definition code look like, if you can share?
krarpitgupta
@krarpitgupta
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) => {
cpeck-bi
@cpeck-bi
how long is the waitTimeout generallly?
krarpitgupta
@krarpitgupta
It's 20000 ms
even If I comment lib.waitFor statement still step is not recognizable