Where communities thrive

  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
Repo info
  • 22:50

    christian-bromann on v8

    rewrite bs package (compare)

  • 16:53
    christian-bromann commented #8156
  • 16:52
    harsha509 commented #8260
  • 16:38
    praveendvd synchronize #8156
  • 16:30
    christian-bromann commented #8323
  • 16:30

    christian-bromann on main

    include asnyc await to screensh… (compare)

  • 16:30
    christian-bromann closed #8353
  • 16:30
    christian-bromann labeled #8353
  • 16:29
    anupamck closed #8323
  • 16:25
    anupamck edited #8353
  • 16:25
    anupamck commented #8353
  • 16:25
    anupamck commented #8353
  • 16:22
    gitpod-io[bot] edited #8353
  • 16:22
    anupamck opened #8353
  • 16:18
    praveendvd synchronize #8156
  • 16:12
    praveendvd labeled #8323
  • 16:11
    praveendvd commented #8323
  • 16:09
    praveendvd reopened #8323
  • 16:09
    praveendvd commented #8323
  • 16:09
    anupamck commented #8323
Christian Bromann
well then it should work
@anandhaprakash-mani which framework?
@christian-bromann its Jasmine
forgive me if this is the wrong place to ask about this. I am evaluating a possible switch to cypress for a react app. Developer experience in writing tests alongside features seems to be part of the attraction of cypress. However, there is a list of limitations for cypress including things like cross-browser testing, multiple tab situations, and inability to access iframe content. Does anyone have experience with both WDIO and Cypress, who can offer opinions and examples to compare the frameworks? Or send me elsewhere if this is not the right place to discuss.
11 replies
Hi! I'm trying to use expect-webdriverio with jasmine. I have "expect-webdriverio": "^1.4.1", "webdriverio": "^7.0.1", in my package.json, have installed them, which as far as I can see on the doc is all I need to do. The functions do not exist when I try to use them in my tests / page objects. Does anyone have any idea why? Or know what else I should check?
Gabriel Lundgren
Hello, I'm trying to use element.getLocation() on Safari, but it seems that the point (0,0) is not the upper-left corner of the page. Any clues on how to solve this?
@glundgren93 can you provide any more detail about the code you are using, and the error/undesired result you are getting
2 replies
Ricky Stansbury
Hello. I am currently in the process of upgrading from version 5 to version 7. When using selectByIndex, selectByVisibleText and selectByAttribute and using puppeteer I am receiving the error of "JSHandles can be evaluated only in the context they were created!". However the commands work normally with when using a seleniun-standlone server. Any help would be appreciated as I want to use the puppeteer feature. I have tried V6 as well as V7 and getting the same for all option selections.
Hell All, I am currently trying to launch my app on mobile browser using devtools service and browser.emulateDevice('iPhone X'); is this the right way
and I have started seeing this error after adding devtools service
[0-0] 2021-04-07T20:00:00.232Z ERROR @wdio/sync: TypeError: Cannot read property 'addCommand' of undefined
at Object.setUnsupportedCommand (/node_modules/@wdio/devtools-service/build/utils.js:13:20)
at DevToolsService._setupHandler (/node_modules/@wdio/devtools-service/build/index.js:168:28)
at DevToolsService.before (/node_modules/@wdio/devtools-service/build/index.js:44:21)
at execHook (/node_modules/@wdio/sync/build/executeHooksWithArgs.js:21:31)
now i am getting browser.emulateDevice is not a function when running the tests here is the setting from config services: ['chromedriver', 'devtools'],
Ben Siggery

Hey there! Wondering how folks are tackling the problem of multiple capabilities when using stuff like Browserstack?

My setup:

  • Tests can run either locally using ChromeDriver / Browserstack, each with their own WDIO config.

What I've implemented so far:

  • Mocha describe level tag of @browserstack to determine what tests run in BS. (filtered using --mochaOpts.grep '@browserstack' in my npm script)

  • Defined my capabilities object to define my browser/device matrix we wish to test against.

What I'd like to add:
it level @ios @android @firefox @edge etc tags to only run required device/browser combinations for a given test

What's the best way of achieving this?

28 replies
So, uh, I'm new here. How can I select an element on the page by data tag?
I see that method but I don't know that's what I'm subscribing
Amar Tanwar
@devtayls please share what you are using now
Where freeTrailSel is ["data-test=start-trial-cta-link"]
2 replies
This error keeps showing as soon as I run the wdio config file, this used to work well before.
Only change done to project was updated cucumber to @cucumber/cucumber package and then changed the import
  1. I can see the feature file is picked
Please can someone help what could cause this error?
Getting below error on npx wdio config -y:

Getting error on npx wdio config -y ( I am using @wdio/cli@7.3.0 and node as v14.16.1) Installing wdio packages:

  • @wdio/local-runner
  • @wdio/mocha-framework
  • @wdio/spec-reporter
  • wdio-chromedriver-service
  • @wdio/sync
  • chromedriver

fibers@5.0.0 install C:\Users\sprakesh\Projects\Test\node_modules\fibers
node build.js || nodejs build.js

win32-x64-83 exists; testing
Binary is fine; exiting

chromedriver@89.0.0 install C:\Users\sprakesh\Projects\Test\node_modules\chromedriver
node install.js

ChromeDriver binary exists. Validating...
ChromeDriver is already available at 'C:\Users\sprakesh\AppData\Local\Temp\89.0.4389.23\chromedriver\chromedriver.exe'.
Copying to target path C:\Users\sprakesh\Projects\Test\node_modules\chromedriver\lib\chromedriver
throw er; // Unhandled 'error' event

Error: EISDIR: illegal operation on a directory, read
Emitted 'error' event on ReadStream instance at:
at internal/fs/streams.js:202:14
at FSReqCallback.wrapper [as oncomplete] (fs.js:539:5) {
errno: -4068,
code: 'EISDIR',
syscall: 'read'
npm WARN rollback Rolling back @nodelib/fs.walk@1.2.6 failed (this is probably harmless): EPERM: operation not permitted, rmdir 'C:\Users\sprakesh\Projects\Test\node_modules\@nodelib'
npm WARN Test@1.0.0 No description
npm WARN Test@1.0.0 No repository field.
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@2.3.2 (node_modules\fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@2.3.2: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})

npm ERR! errno 1
npm ERR! chromedriver@89.0.0 install: node install.js
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the chromedriver@89.0.0 install script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\sprakesh\AppData\Roaming\npm-cache_logs\2021-04-08T08_40_41_421Z-debug.log
wdio.js config

Initialize WebdriverIO and setup configuration in your current project.

--version Show version number [boolean]
--watch Run WebdriverIO in watch mode [boolean]
-h, --hostname automation driver host address [string]
-p, --port automation driver port [number]
--path path to WebDriver endpoints (default "/") [string]
-u, --user username if using a cloud service as automation backend
-k, --key corresponding access key to the user [string]
-l, --logLevel level of logging verbosity
[choices: "trace", "debug", "info", "warn", "error", "silent"]
--bail stop test runner after specific amount of tests have
failed [number]
--baseUrl shorten url command calls by setting a base url[string]
-w, --waitforTimeout timeout for all waitForXXX commands [number]
-f, --framework defines the framework (Mocha, Jasmine or Cucumber) to
run the specs [string]
-r, --reporters reporters to print out the results on stdout [array]
--suite overwrites the specs attribute and runs the defined
suite [array]
--spec run only a certain spec file - overrides specs piped
from stdin [array]
--exclude exclude certain spec file from the test run - overrides
exclude piped from stdin [array]
--mochaOpts Mocha options
--jasmineOpts Jasmine options
--cucumberOpts Cucumber options

Joshua Sturrock

Hi We've just done an upgrade from v6->v7 and everything seems fine so far except this one error:

error TS2688: Cannot find type definition file for 'webdriverio/sync'.
  The file is in the program because:
    Entry point of type library 'webdriverio/sync' specified in compilerOptions

    21     "types": ["node", "webdriverio/sync", "@wdio/mocha-framework", "expect-webdriverio"]
    File is entry point of type library specified here.

Found 1 error.

Not sure if anyone else has spotted this before or knows what the cause is?

Erwin Heitzman
@jxshco it should find that file after the upgrade. could you try to delete your node_modules and package-lock.json and run npm install and see if the error still exists after that?
@satyauit seems like a clear error to me, it's missing some privileges. see the error: operation not permitted, rmdir
Raziel Alron
Hi, can I control suites/specs (such as spec.stop() or something) with that Jasmine option: expectationResultHandler?
Ben Siggery
Screenshot 2021-04-08 at 11.31.29.png

Has anyone else seen an issue where hooks get displayed as tests within the Browserstack dashboard?

From the image above, all the sessions with GUIDs are mocha hooks, whilst the named sessions are legitimate tests

Is there a good way of not including these, without having to call the Browserstack API to delete the sessions after execution? :(
Simon Engel

Hi, I am trying to set up gitlab CI to run my tests but I just cannot get it to work. When I was using chromedriver in aorund 50% of the tests I got "invalid session id". Locally I have never gotten this error. So now I tryied to switch to selenium-standalone.
My pipeline looks like this:


  • test


image: node:12

- selenium/standalone-chrome

stage: test

- apt-get update
- npm i
- npx wdio run ./wdio.conf.js
- allure generate allure-results

expire_in: 14 days

  - "allure-report"

But here the error is "Error: not found: java" as well as "ERROR webdriver: RequestError: connect ECONNREFUSED at ClientRequest"
Can anyone help me on that?

Erwin Heitzman
@siggerzz have you read the documentation of that reporter?
@s8sgenge_gitlab seems like java isn't installed on the image or that it is but it couldn't find it
Simon Engel
@erwinheitzman but isn't java installed in selenium/standalone-chrome?
Erwin Heitzman
@s8sgenge_gitlab it would be an assumption but yes I would think it would
however you are probably trying to run selenium-standalone as a service
while it's already running inside that container
Simon Engel
@erwinheitzman What is the best way to configure the CI then? I basically just need selenium-standalone chrome and node12 installed
Erwin Heitzman
@s8sgenge_gitlab I'm not sure how you have everything setup so it's hard to answer that question without any information about how you are currently running things
Simon Engel

@erwinheitzman It is a very basic project so usually I run my tests locally using "npx wdio run ./wdio.conf.js".
I only want to test chrome browser using selenium-standalone.

What other information does one need to help configuring the CI?

2 replies
Simon Engel
Erwin Heitzman
@s8sgenge_gitlab like I was assuming earlier you are trying to start selenium-standalone in a selenium docker container that already has that running
also, you have chromedriver + the chomedriver service installed which aren't used
Ben Siggery
@erwinheitzman Unfortunately it's not a reporter, it's the browserstack dashboard :(
Erwin Heitzman
@siggerzz not sure about that, are you sure those are hooks and not just the start of the session for example?