Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • 16:26
    dylanlive closed #7023
  • 16:26
    dylanlive commented #7023
  • 14:33
    dependabot[bot] edited #7035
  • 14:32

    dependabot[bot] on npm_and_yarn

    (compare)

  • 14:32

    christian-bromann on main

    Bump core-js from 3.14.0 to 3.1… (compare)

  • 14:32
    christian-bromann closed #7035
  • 14:32
    dependabot[bot] synchronize #7035
  • 14:32
    dependabot[bot] edited #7035
  • 14:32

    dependabot[bot] on npm_and_yarn

    Bump core-js from 3.14.0 to 3.1… (compare)

  • 14:32
    dependabot[bot] edited #7035
  • 14:31

    dependabot[bot] on npm_and_yarn

    (compare)

  • 14:31
    dependabot[bot] commented #7034
  • 14:31
    christian-bromann closed #7034
  • 14:31

    dependabot[bot] on npm_and_yarn

    (compare)

  • 14:31
    dependabot[bot] edited #7035
  • 14:31
    dependabot[bot] commented #7036
  • 14:30
    christian-bromann closed #7036
  • 14:30

    dependabot[bot] on npm_and_yarn

    (compare)

  • 14:30
    dependabot[bot] commented #7037
  • 14:30
    christian-bromann closed #7037
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.
AndreyI
@andreyivanov86
Hi, I know there were several questions on how to setValue to <input> component. I am trying to set value "04/13/2021 12:46" as my Start date and time but nothing happens. The page is built on Angular and Kendo UI. I've tried using .setValue and .addValue. Maybe the browser.execute() would be a solution but it adds i bit of complexity. There are must be something simple, but I cannot find it. I would really appreciate it if someone could point me in the right direction.
Tony Rosario
@tonyrosario

using selenium-standalone-service and am getting an error ERROR webdriver: Request failed with status 500 due to session not created: session not created: This version of ChromeDriver only supports Chrome version 90

however the latest version of Chrome isn't released yet (according to about Google Chrome) - guessing a release is scheduled for today. wondering if there's an update we could make to the service or if this more of a dependency issue, like on selenium-standalone

4 replies
Christian Bromann
@christian-bromann
Hey @andreyivanov86 👋 do you have an example app we can use to test?
AndreyI
@andreyivanov86
@christian-bromann our resource is not publicly available, but here is the excerpt on stackblitz https://s7xngo--run.stackblitz.io. We use DateTimePicker on the right side. Thank you for taking your time.
Christian Bromann
@christian-bromann
@andreyivanov86 the app never opens, it stays at Starting dev server
AndreyI
@andreyivanov86
@christian-bromann wow, it really is. Ok here is resource https://www.telerik.com/kendo-angular-ui/components/dateinputs/ it's right in Basic Usage example. There you can click EDIT IN STACKBLITZ, but it would take few seconds to open up.
If you inspect DateTimePicker, that is exactly what we have.
Christian Bromann
@christian-bromann
which date input you want to change?
but yeah, the easiest is to update with execute, e.g.
browser.execute((input) => (input.value = “11/11/2022”), $(‘input’)
you can create a custom command that simplifies this for you
AndreyI
@andreyivanov86
logan-downes
@logan-downes
Hello all, so I ran ncu to update all my packages up to 7.4.0 and am now getting this error. Also tried reverting my package back and still seeing the issue (cleared out node modules folder and package-lock and no luck).
  throw err;
  ^

Error: Cannot find module '../build'
Require stack:
- /Users/logandownes/vcr-cloud/qa/ExtCareWebAutomation/node_modules/@wdio/cli/bin/wdio.js
    at Function.Module._resolveFilename (internal/modules/cjs/loader.js:880:15)
    at Function.Module._load (internal/modules/cjs/loader.js:725:27)
    at Module.require (internal/modules/cjs/loader.js:952:19)
    at require (internal/modules/cjs/helpers.js:88:18)
    at Object.<anonymous> (/Users/logandownes/vcr-cloud/qa/ExtCareWebAutomation/node_modules/@wdio/cli/bin/wdio.js:11:1)
    at Module._compile (internal/modules/cjs/loader.js:1063:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1092:10)
    at Module.load (internal/modules/cjs/loader.js:928:32)
    at Function.Module._load (internal/modules/cjs/loader.js:769:14)
    at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:72:12) {
  code: 'MODULE_NOT_FOUND',
  requireStack: [
    '/Users/logandownes/vcr-cloud/qa/ExtCareWebAutomation/node_modules/@wdio/cli/bin/wdio.js'
  ]
Christian Bromann
@christian-bromann
@logan-downes sorry about that, a new release was made with a fix
Viral Panchal
@viralkpanchal
Hi All,
I recently upgraded webdriverio version to 7, and browser.config.hostname is not returning value anymore. Before upgrading, I was running this test on webdriverio_v5, and it was returning either localhost or hub-cloud.browserstack.com when tests run on BrowserStack.
Could someone please let me know which property to use to get the hostname?
Raziel Alron
@razielron
Hi there, I am trying to use json reporter but I can't see that is compatible with wdio v7.
I tried anyway and it doesn't work, is it a known issue? will it be fixed?
cezarybielec-itm
@cezarybielec-itm
hi, i wonder if there is some method to maximize the browser's window during tests?
Christian Bromann
@christian-bromann
@cezarybielec-itm did you look into the API docs? https://webdriver.io/docs/api/webdriver/#maximizewindow
cezarybielec-itm
@cezarybielec-itm
@christian-bromann oh thank you very much. I did but as the code was underlined in the vscode i thought it wouldn't work. Now i've run the tests and it works perfectly. Seems like i lack something in the configuration. Have a good day!
fabianschmider
@fabianschmider
Hi there, I want to open a website on saucelabs and accept the certs automatically. "acceptInsecureCerts: true" worked with all browsers except safari.
I have tried: autoAcceptAlerts, autoDismissAlerts, acceptSslCerts, acceptInsecureCerts to true - Does anyone know the capability to accept the certs on safari/iOS?
Akamel
@Amrkamel1
What could be a reason for the long loading time for some websites when I automate them?
Christian Bromann
@christian-bromann
@fabianschmider if it works on all other browsers but Safari it is likely a bug in Safaridriver
Akamel
@Amrkamel1
[0-0] 2021-04-14T08:03:50.149Z ERROR @wdio/runner: Error: Invalid or unsupported WebDriver capabilities found ("protocol", "hostname", "port", "path"). Ensure to only use valid W3C WebDriver capabilities (see https://w3c.github.io/webdriver/#capabilities).
still occurring with the new pakcages
Christian Bromann
@christian-bromann
@Amrkamel1 did you cleaned up your package-lock?
Akamel
@Amrkamel1
ops i think i forgot that, let me try again