Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • 17:08
    klamping commented #6540
  • 14:32
    th0car closed #6816
  • 14:32
    th0car commented #6816
  • 14:20

    christian-bromann on main

    fix edit link for contributing … (compare)

  • 14:15

    christian-bromann on main

    fix edit link for contributing … (compare)

  • 10:08

    christian-bromann on cb-sync-without-fibers

    transform browser commands (compare)

  • 09:30

    christian-bromann on cb-sync-without-fibers

    initial development (compare)

  • 04:55
    ashishnarmen commented #5545
  • May 06 18:58
    mikesalvia synchronize #6836
  • May 06 17:25
    mikesalvia commented #6836
  • May 06 15:45
    th0car commented #6816
  • May 06 15:09
    th0car commented #6816
  • May 06 14:35
    mikesalvia synchronize #6836
  • May 06 14:23
    mikesalvia commented #6836
  • May 06 14:21
    mikesalvia edited #6836
  • May 06 14:21
    mikesalvia edited #6836
  • May 06 14:21
    mikesalvia edited #6836
  • May 06 14:20
    mikesalvia opened #6836
  • May 06 13:33

    github-actions[bot] on v7.5.7

    v7.5.7 (compare)

  • May 06 13:32

    github-actions[bot] on main

    v7.5.7 (compare)

Johnson E
@jonn-set
@erwinheitzman thanks, is the upgrade from 6 to 7 non breaking?
Scott Mac Donald
@Corinos
Hey folks, does anyone have a tool for testing WDIO selectors? I have chained selector that seems to work with each part on their own in the console, but since the console doesn't let me use chained selectors the same way, I can't test the whole thing, and when I run WDIO using that selector, i get an unexpected return.
Is the a browser extension or anything that I could use?
Akamel
@Amrkamel1
is there any updates regarding the multi remote issue
    Error: Invalid or unsupported WebDriver capabilities found ("protocol", "hostname", "port", "path"). Ensure to only use valid W3C WebDrive
Christian Bromann
@christian-bromann
there is a PR that will be merged and released soon
fedoseevGIT
@fedoseevGIT
Hello everyone) Does anyone use restarting tests through the Re-run-service? After passing the tests, a sh file is generated to re-run the tests, but I do not quite understand where to call it. When I insert the execution of this file into the OnComplete hook, the process is automatically killed after a while and the tests are not restarted.
kfir ben hamou
@kfirbhCS
Anyone knows if video reported is fully sported on version 7 ?
Christian Bromann
@christian-bromann
@kfirbhCS what do you mean by video support?
1 reply
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!

Anybody? :D Please, any idea is welcomed. Thanks!

Erwin Heitzman
@erwinheitzman
If I knew I'd tell you O_O
Orozbek Askarov
@Askarov5
Hi, QQ: Does webdriverio support Oracle Forms?
kfir ben hamou
@kfirbhCS
@christian-bromann
Sorry i meant video-reporter
Orozbek Askarov
@Askarov5
@christian-bromann Does WebdrivrIO support Oracle Forms? Any version? did anyone experience or try?
Erwin Heitzman
@erwinheitzman
@Askarov5 just did a quick search and it looks like this is not made for web, is that assumption correct?
If it's a Windows application there's a driver for that
Orozbek Askarov
@Askarov5
@erwinheitzman Oracle forms application can be opened in the browser, so I was thinking it might be possible... I made my research and found info for about selenium and Oracle Forms but not for webdriverio, So I just wanted to double check and make sure. Sorry, for bothering.
Erwin Heitzman
@erwinheitzman
@Askarov5 we utilize the same protocol so I don't see any limitations
Unless the structure is not html, in which case selenium might have some special implementation
But since you mentioned it's opened in a browser I am assuming it's just plain old html with nothing special
Amar Tanwar
@amartanwar42

Hi Team,
After updating the webdriver.io i started getting the following error
"Unable to load spec files quite likely because they rely on browser object that is not fully initialised.browser object has only capabilities and some flags like isMobile.
Helper files that use other browser commands have to be moved to before hook."

I found a doc where it is mentioned that all browser-related functions should be moved to before hook.
https://webdriver.io/blog/2019/11/01/spec-filtering/

Can someone please tell what and all browser functions should be moved inside before hook?

I am currently using the following browser methods
browser.call()
browser.getCookies()
browser.execute()
browser.pause()
browser.keys()
browser.url(path);
browser.switchToFrame();
browser.switchWindow();
browser.refresh();

Phil Merwin
@pmerwin

hey guys I am on the latest wdio vs 7.3 , I am seeing this issue again:

webdriverio/webdriverio#4833

in multi remote sauce links are missing in spec, and json reporters

anyone have any ideas ? Should this be reopened or?

Olga
@osmolyar

Hi, is anyone using Webstorm IDE with v7 and finding that the new syntax for type extension doesn't get recognized?

declare global {
    namespace WebdriverIO {
        interface Browser {
            browserCustomCommand: (arg: number) => void
        }
    }
}

some people see this warning on declare global:

TS2669: Augmentations for the global scope can only be directly nested in external modules or ambient module declarations

but even without the warning, the IDE highlights custom commands as undefined.

Olga
@osmolyar
Actually it happens with any IDE, VSCode too. Does this only work with ts-node and not babel configuration?
HarvWorks
@HarvWorks
QQ, I saw online that the runner option in wdio.conf.js only supports local is that still true?
GURU KIRAN
@AutomationGuru

GM i am trying to see not much of console logs when running tests, i see :

Execution of 3 spec files started at 2021-04-13T05:16:10.789Z
[1-0] RUNNING in safari -

although the log level is silent
how can i only get the summary like this Spec Files: 3 passed, 3 total (100% completed) in 00:00:33 and not running or pass status

fedoseevGIT
@fedoseevGIT
Hello everyone) Does anyone use restarting tests through the Re-run-service? After passing the tests, a sh file is generated to re-run the tests, but I do not quite understand where to call it. When I insert the execution of this file into the OnComplete hook, the process is automatically killed after a while and the tests are not restarted.
Raziel Alron
@razielron
Hi, I am using Jasmine and when I have a test that breaks before the first 'describe' it doesn't fail the test, just skipped it.
any suggestion on how make it fail on this scenario?
Bastien Dufau
@bdufau

Hi all, I was wondering about the browser.positionDoubleClick() function. Is it still available ? I am with wdio version 7.3.0 and I m getting

browser.positionDoubleClick is not a function

But I m can still access the definition in my code editor

theDriveIN
@vodjanec_twitter

Hello,
Has anyone ever try to run .bat file (script) using WebdriverIO, possible run in the before hook, located into WDIO.conf?

https://stackoverflow.com/questions/67074854/webdriverio-how-to-run-bat-script-using-webdriverio

Christian Bromann
@christian-bromann
@vodjanec_twitter you might can execute things via shelljs package
Olga
@osmolyar

Re. 'new syntax for type extension doesn't get recognized',

declare global {
    namespace WebdriverIO {
        interface Browser {
            browserCustomCommand: (arg: number) => void
        }
    }
}

this syntax does work if the type definition file is recognized as a module (e.g, add "export {}"), but then it doesn't work as an ambient type definition file. We were using ambient d.ts files. Does this imply a requirement in v7 to use module type definition files?

6 replies
Delon
@delonborges

Hi, everyone!
I'm trying to get started with WebdriverIO, but, I'm strugling with some compiling errors:

test/specs/example.e2e.ts(9,50): error TS2339: Property 'toBeExisting' does not exist on type 'FunctionMatchers<any>'.
test/specs/example.e2e.ts(10,50): error TS2339: Property 'toHaveTextContaining' does not exist on type 'FunctionMatchers<any>'.

It's an Angular project (removing Protractor) with Typescript and Jasmine.
My tsconfig.json:

{
  "extends": "../../tsconfig.base.json",
  "compilerOptions": {
    "sourceMap": false,
    "target": "es2018",
    "module": "commonjs",
    "removeComments": true,
    "noImplicitAny": true,
    "strictPropertyInitialization": true,
    "strictNullChecks": true,
    "types": [
      "node",
      "webdriverio/sync",
      "expect-webdriverio",
      "@wdio/local-runner",
      "@wdio/jasmine-framework",
      "@wdio/sync"
    ]
  },
  "include": ["../**/*.ts"]
}

Thanks in advance for any help!

11 replies
Christian Bromann
@christian-bromann
@delonborges any particular reasons you pick Jasmine? You won’t have issues with Mocha and the testrunner is almost the same
7 replies
or removing "@wdio/jasmine-framework” might work as well
also, Welcome to the WebdriverIO community!
Afsal Backer
@gm4afsal

Hello everyone, I am getting a WebdriverIO-Jasmine Async function did not complete within 10000ms error and has been trying to debug the root cause of it for more than a day now. I have posted the question here :

https://stackoverflow.com/questions/67073043/webdriverio-jasmine-async-function-did-not-complete-within-10000ms

Any help is much appreciated.

Frank S.
@fspinillo

Is there any clear documentation or examples on custom configurations with typescript? I'm spot checking v7 and our custom configurations no longer work.

declare module WebdriverIO {
  // adding command to browser
  interface Options {
    foo? string
  }
}

spec.ts

browser.config.foo

Which now results in Property 'foo' does not exist on type 'WebdriverIO | Testrunner'

Erwin Heitzman
@erwinheitzman
hmm what about interface Config?
Frank S.
@fspinillo
does not exist on type 'Testrunner | WebdriverIO'
{
  "compilerOptions": {
      "baseUrl": ".",
      "paths": {
        "*": [ "./*" ],
      },
      "moduleResolution": "node",
      "target": "es2017",
      "module": "commonjs",
      "typeRoots": ["./types"],
      "types": ["node", "webdriverio/sync", "mocha", "expect-webdriverio", "wdio-intercept-service", "wdio-image-comparison-service", "./types/wdio"]
  },
  "include": [
    "./pages/**/*.ts",
    "./specs/**/*.ts",
    "./types/*.ts"
  ],
  "exclude": [
    "./node_modules"
  ]
}
This is my tsconfig
Frank S.
@fspinillo
I found one issue on GH of someone having a similar experience and the solution provided was the following, but it's not clear on the how/why of using it. They simply said to just add it to the file
declare global {
    namespace WebdriverIO {
        interface Browser {
            config: WebdriverIO.Config
        }
    }
}
Erwin Heitzman
@erwinheitzman
@fspinillo I suggest to checkout https://webdriver.io/blog#typescript-rewrite
Frank S.
@fspinillo
I did, but there's not consistent information between the blog and the v7 documentation. I'll see what I can figure out
Erwin Heitzman
@erwinheitzman
what makes you say that? the docs show the same code https://webdriver.io/docs/typescript
Frank S.
@fspinillo
It's the combination of all the new info from the blog post being spread out across the docs. The docs/typescript mention autocompile but to understand it you have to go into a different page. The blog also mentions removing ts-node/register from mocha/jasime opts but that doesn't appear to be in the docs. It's just not explicitly clear that's all.
I did get the custom config work, the above needed to be added in and then i was able to define interface Config
Erwin Heitzman
@erwinheitzman
@fspinillo well yes, the blog describes changes like the removal of ts-node/register so it's not strange it's no longer found in the documentation no? if you feel there's inconsistency, feel free to change it and we'll review it with pleasure :)
glad to hear you got it working
Frank S.
@fspinillo
Thanks, wasn't trying to say the docs were bad. Just was getting a bit confused with the changes and as I still understand TS.