Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • 17:24
    christian-bromann closed #8375
  • 17:24
    christian-bromann commented #8375
  • 17:16
    PFaz540 labeled #8375
  • 17:16
    PFaz540 labeled #8375
  • 17:16
    PFaz540 opened #8375
  • 15:38
    Ankit098 synchronize #8374
  • 13:38
    pavanzebra commented #8279
  • 12:29
    Ankit098 commented #8374
  • 12:19
    Ankit098 synchronize #8374
  • 11:19

    christian-bromann on v8

    adjust package.json of mocha fr… (compare)

  • 09:24
    christian-bromann closed #8301
  • 09:24
    christian-bromann commented #8301
  • 09:21
    christian-bromann closed #8302
  • 09:21
    christian-bromann commented #8302
  • 09:10

    christian-bromann on v8

    make Node.js v16 a requirement transform @wdio/protocols into … transform @wdio/logger into ESM and 41 more (compare)

  • 09:00

    christian-bromann on v8

    enable mocha tests (compare)

  • 08:56

    christian-bromann on v8

    rewrite @wdio/mocha-framework t… (compare)

  • 08:36

    christian-bromann on v8

    rewrite @wdio/devtools-service … eslint fixes (compare)

  • May 24 20:41
    christian-bromann commented #8361
  • May 24 19:43
    yon-cuadrado commented #8361
KC
@kannappanc
Only change done to project was updated cucumber to @cucumber/cucumber package and then changed the import
image.png
  1. I can see the feature file is picked
Please can someone help what could cause this error?
satyauit
@satyauit
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
events.js:292
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! code ELIFECYCLE
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.

Options:
--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
[string]
-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
--aut

Joshua Sturrock
@jxshco

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

  tsconfig.automation.json:21:23
    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
@erwinheitzman
@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
@razielron
Hi, can I control suites/specs (such as spec.stop() or something) with that Jasmine option: expectationResultHandler?
Ben Siggery
@siggerzz
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
@s8sgenge_gitlab

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:

stages:

  • test

variables:
GIT_SUBMODULE_STRATEGY: recursive

test-dm-test:
image: node:12
services:

- selenium/standalone-chrome

stage: test
script:

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

artifacts:
expire_in: 14 days
paths:

  - "allure-report"

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

Erwin Heitzman
@erwinheitzman
@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
@s8sgenge_gitlab
@erwinheitzman but isn't java installed in selenium/standalone-chrome?
Erwin Heitzman
@erwinheitzman
@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
@s8sgenge_gitlab
@erwinheitzman What is the best way to configure the CI then? I basically just need selenium-standalone chrome and node12 installed
Erwin Heitzman
@erwinheitzman
@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
@s8sgenge_gitlab

@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
@s8sgenge_gitlab
Erwin Heitzman
@erwinheitzman
@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
@siggerzz
@erwinheitzman Unfortunately it's not a reporter, it's the browserstack dashboard :(
Erwin Heitzman
@erwinheitzman
@siggerzz not sure about that, are you sure those are hooks and not just the start of the session for example?
Phil Merwin
@pmerwin

hey guys I am trying to get multi remote working, I am passing my caps as:

class MultiChromeCapabilities {
    constructor(cliOptions) {
        this.myChromeBrowser1 = {
            capabilities: {
                browserName: 'chrome'
            }
        },
        this.myChromeBrowser2 = {
            capabilities: {
                browserName: 'chrome'
            }
        }
    }
}

module.exports = MultiChromeCapabilities;

or

class MultiChromeCapabilities {
    constructor(cliOptions) {
        this.capabilities = {
            myChromeBrowser1 = {
                capabilities: {
                    browserName: 'chrome'
                }
            },
            myChromeBrowser2 = {
                capabilities: {
                    browserName: 'chrome'
                }
            }
        }

    }
}

module.exports = MultiChromeCapabilities;

Neither appears to be working:

ERROR @wdio/runner: Error: Couldn't identify browserName "undefined"

however browser is defined when I console log the caps:

myChromeBrowser1: { capabilities: { browserName: 'chrome' } },
myChromeBrowser2: { capabilities: { browserName: 'chrome' } }

Any ideas on what I may be doing wrong? Trying a vanilla install of wdio with just multi remote caps now...

devTayls
@devtayls
Hey all- I have a silly question:
This is failing and I don't understand why
2021-04-08_10-52.png

Expect $(Products) to be visible

Expected: "visible"
Received: "not visible"

Christian Bromann
@christian-bromann
is Products selecting an element <Products />
devTayls
@devtayls
No- it was supposed to grabbing the text Products
But I think I resolved the issue
Thanks
Orozbek Askarov
@Askarov5
Hi, Configuration for logs('outputDir': 'logs'): in 'logs' folder I'm seeing files like wdio-0-0.log or wdio-0-1.log and it looks like webdriverio creates a log file for each test file. Is there a way to add test file name to the log file name???
Veena Vijayan
@veenaMSL_gitlab

Hi, I added takeScreenshot() in config file's afterTest setting. I got a large data value in the onTestEnd() event handler. I tried to convert that value to image. But couldn't. How to generate image file from that value?
wdio.conf.js

afterTest: async function (
    test,
    context, {
      error,
      result,
      duration,
      passed,
      retries
    }
  ) {
    if (!passed) {
      await browser.takeScreenshot();
    }
  }

customreporter.js

import WDIOReporter from '@wdio/reporter';

export default class CustomReporter extends WDIOReporter {
  constructor(options) {
    /*
      * make reporter to write to the output stream by default
      */
    options = Object.assign(options, {
      stdout: true
    });
    super(options);
  }

  onTestEnd(test) {
    if (test.state === 'failed') {
      //conversion code
    }
  }
}
Marijana Rukavina
@mareru

I get this error: Error: The "from" argument must be of type string. Received undefined. From the stack trace I can see that it is related to cucumber somehow.
This is the stack trace:

2021-04-08T18:29:37.403Z ERROR @wdio/runner: TypeError [ERR_INVALID_ARG_TYPE]: The "from" argument must be of type string. Received undefined
    at validateString (internal/validators.js:120:11)
    at Object.relative (path.js:437:5)
    at getDefinitionLineAndUri (C:\my-project\node_modules\cucumber\lib\support_code_library_builder\build_helpers.js:184:27)
    at buildStepDefinitionConfig (C:\my-project\node_modules\cucumber\lib\support_code_library_builder\build_helpers.js:124:7)
    at SupportCodeLibraryBuilder.defineStep (C:\my-project\node_modules\cucumber\lib\support_code_library_builder\index.js:51:79)
    at Object.<anonymous> (C:\my-project\src\step_definitions\/accountSummary_steps.js:6:1)
    at Module._compile (internal/modules/cjs/loader.js:1137:30)
    at Module._compile (C:\my-project\node_modules\pirates\lib\index.js:99:24)
    at Module._extensions..js (internal/modules/cjs/loader.js:1157:10)
    at Object.newLoader [as .js] (C:\my-project\node_modules\pirates\lib\index.js:104:7)
    at Module.load (internal/modules/cjs/loader.js:985:32)
    at Module._load (internal/modules/cjs/loader.js:878:14)
    at Function.hookedLoader [as _load] (C:\my-project\node_modules\mockery\mockery.js:111:12)
    at Module.require (internal/modules/cjs/loader.js:1025:19)
    at require (internal/modules/cjs/helpers.js:72:18)
    at C:\my-project\node_modules\@wdio\cucumber-framework\build\index.js:204:13

In my steps.js file I only have:

When(/^I click on My account details link$/, function () {
    loggedInHeaderModule.openAccountSummary();
});

This is my package.json dependencies:

"dependencies": {
    "@babel/cli": "^7.2.3",
    "@babel/plugin-proposal-export-default-from": "^7.5.2",
    "@babel/preset-env": "^7.4.2",
    "@babel/register": "^7.4.0",
    "@types/cucumber": "^7.0.0",
    "@wdio/cli": "^7.3.1",
    "@wdio/config": "^7.3.1",
    "@wdio/cucumber-framework": "^7.3.1",
    "@wdio/local-runner": "^7.3.1",
    "@wdio/selenium-standalone-service": "^7.3.1",
    "@wdio/spec-reporter": "^7.3.1",
    "@wdio/sync": "^7.3.1",
    "chai": "^4.3.4",
    "cucumber": "^6.0.5",
    "eslint-plugin-wdio": "^7.0.0",
    "file-system": "^2.2.2",
    "mjpeg-consumer": "^2.0.0",
    "node-fetch": "^2.6.1",
    "webdriverio": "^7.3.1",
    "yarn": "^1.22.10"
  },
  "devDependencies": {
    "@babel/core": "^7.4.0",
    "@wdio/allure-reporter": "^7.3.1",
    "@wdio/browserstack-service": "^7.3.1",
    "@wdio/junit-reporter": "^7.3.1",
    "babel-eslint": "^10.1.0",
    "babel-jest": "^26.6.3",
    "eslint": "^7.23.0",
    "eslint-plugin-import": "^2.22.1",
    "forever": "^3.0.4",
    "jest": "^26.6.3",
    "npm-run-all": "^4.1.5"
  }

I don't have clue what could be wrong. Anybody has any idea? Thanks!

1 reply
devTayls
@devtayls
Is there a simple way to check that browser.url() resolved correctly?
techyguy78
@techyguy78
@christian-bromann hey , do we have any equivalent events in WDIO v7 for V4 events "start" & "end" ? . WDIO v7 events "runnerStart" and "runnerEnd" is not fulfilling our custom report logic ?
ilovepumpkin
@ilovepumpkin
Hello, I am doing login step in beforeSuite hook, but for some reasons, the login step may fail some times, to make the whole wdio test fail earlier, is there any way to skip all the tests if any error occurs in beforeSuite hook?
mansiKulkarni39
@mansiKulkarni39
Hello, I am trying to execute test script on headless emulator, but it is giving locator not found, whereas same test script run on emulator is able to find locator. And idea, whether I am missing any thing? Or anything need to add in capabilities?
Federico Francia
@federicoitaly:matrix.org
[m]
Hi everybody,
I often get this error: ERROR webdriver: RequestError: read ECONNRESET. it's probably due to the cloud farm,
is there a way to trap it and make the webdriverIO quit gracefully?
shoaibAutomationEngineer
@shoaibAutomationEngineer
Hi can anyone share how to use xpath in appium with webdriverio ?
Christian Bromann
@christian-bromann
@shoaibAutomationEngineer the same way you use xpath with any other environment
shoaibAutomationEngineer
@shoaibAutomationEngineer
@christian-bromann Thanks