Code Monkey home page Code Monkey logo

Comments (13)

christian-bromann avatar christian-bromann commented on September 22, 2024

@MaheshGooner you are using v5 with Cucumber? This is not yet supported. Please follow webdriverio/webdriverio#3667 for updates.

from wdio-cucumber-framework.

MaheshGooner avatar MaheshGooner commented on September 22, 2024

@christian-bromann i got this issue fixed and i am able to run cucumber with wdio 5

from wdio-cucumber-framework.

abjerstedt avatar abjerstedt commented on September 22, 2024

@MaheshGooner please elaborate..... I haven't completed my PR yet, and so we don't support cucumber.

from wdio-cucumber-framework.

MaheshGooner avatar MaheshGooner commented on September 22, 2024

@abjerstedt I use the below configuration and i launch the selenium server separately but only once before the tests execute and i also install chromedriver

"devDependencies": {
    "@wdio/allure-reporter": "^5.7.11",
    "@wdio/local-runner": "^5.8.6",
    "@wdio/sync": "^5.8.6",
    "chromedriver": "^74.0.0",
    "wdio-chromedriver-service": "^5.0.1",
    "wdio-cucumber-framework": "2.2.8",
    "wdio-selenium-standalone-service": "~0.0.12"
  },
  "dependencies": {
    "@wdio/cli": "^5.8.6",
    "babel-preset-env": "^1.6.0",
    "babel-register": "^6.26.0",
    "selenium-standalone": "^6.8.0",
    "wdio-allure-reporter": "^0.6.0"
  }

I get one deprecation warning though

[0-0] (node:20420) [DEP0005] DeprecationWarning: Buffer() is deprecated due to security and usability issues. Please use the Buffer.alloc(), Buffer.allocU
nsafe(), or Buffer.from() methods instead.

But i am able to run my cucumber tests without any issues.

from wdio-cucumber-framework.

abjerstedt avatar abjerstedt commented on September 22, 2024

@MaheshGooner I don't see "webdriverio" in your dependencies at all... AFAIK, @wdio/cli isn't enough, and i have a feeling you are using v4 still.

Try nuking your node modules and yarn lock and starting fresh. wdio-cucumber-framework 2.2.8 will not work with v5.

from wdio-cucumber-framework.

abjerstedt avatar abjerstedt commented on September 22, 2024

Actually... i'm 100% sure of it. Looking at your log, you are seeing logLevels that are v4. We don't use info/debug in v5.

from wdio-cucumber-framework.

MaheshGooner avatar MaheshGooner commented on September 22, 2024

I deleted my nodemodules and yarn.lock. reran the project and still all good.
I also have a CI runner on an ubuntu docker container no problems there as well.

from wdio-cucumber-framework.

BorisOsipov avatar BorisOsipov commented on September 22, 2024

@MaheshGooner you can remove all "@wdio/*" packages and everything still will be good :)

from wdio-cucumber-framework.

MaheshGooner avatar MaheshGooner commented on September 22, 2024

haha. sorry that doesn't work :D. you know i have a wdio.conf.js :)

from wdio-cucumber-framework.

abjerstedt avatar abjerstedt commented on September 22, 2024

@MaheshGooner

[0-0] 2019-05-21T13:30:43.072Z INFO @wdio/local-runner: Run worker command: run
[0-0] 2019-05-21T13:30:43.165Z INFO webdriver: [POST] http://127.0.0.1:4444/wd/hub/session
[0-0] 2019-05-21T13:30:43.165Z INFO webdriver: DATA { capabilities:
    { alwaysMatch: { browserName: 'chrome', 'goog:chromeOptions': [Object] },
      firstMatch: [ {} ] },
   desiredCapabilities:
    { browserName: 'chrome',
      'goog:chromeOptions': { args: [Array] } } }
[0-0] 2019-05-21T13:30:43.183Z DEBUG webdriver: request failed due to status 33
[0-0] 2019-05-21T13:30:43.183Z INFO webdriver: Retrying 1/3
[0-0] 2019-05-21T13:30:43.183Z INFO webdriver: [POST] http://127.0.0.1:4444/wd/hub/session
[0-0] 2019-05-21T13:30:43.184Z INFO webdriver: DATA { capabilities:
    { alwaysMatch: { browserName: 'chrome', 'goog:chromeOptions': [Object] },
      firstMatch: [ {} ] },
   desiredCapabilities:
    { browserName: 'chrome',
      'goog:chromeOptions': { args: [Array] } } }
[0-0] 2019-05-21T13:30:43.192Z DEBUG webdriver: request failed due to status 33
[0-0] 2019-05-21T13:30:43.192Z INFO webdriver: Retrying 2/3
[0-0] 2019-05-21T13:30:43.192Z INFO webdriver: [POST] http://127.0.0.1:4444/wd/hub/session
[0-0] 2019-05-21T13:30:43.192Z INFO webdriver: DATA { capabilities:
    { alwaysMatch: { browserName: 'chrome', 'goog:chromeOptions': [Object] },
      firstMatch: [ {} ] },
   desiredCapabilities:
    { browserName: 'chrome',
      'goog:chromeOptions': { args: [Array] } } }
[0-0] 2019-05-21T13:30:43.199Z DEBUG webdriver: request failed due to status 33
[0-0] 2019-05-21T13:30:43.199Z INFO webdriver: Retrying 3/3
[0-0] 2019-05-21T13:30:43.200Z INFO webdriver: [POST] http://127.0.0.1:4444/wd/hub/session
[0-0] 2019-05-21T13:30:43.200Z INFO webdriver: DATA { capabilities:
    { alwaysMatch: { browserName: 'chrome', 'goog:chromeOptions': [Object] },
      firstMatch: [ {} ] },
   desiredCapabilities:
    { browserName: 'chrome',
      'goog:chromeOptions': { args: [Array] } } }
[0-0] 2019-05-21T13:30:43.208Z DEBUG webdriver: request failed due to status 33

You are definitively using Webdriverio v4. This is not a v5 log. That said, you are using v5 CLI, and you can see the v4 code printing to stdout.

How did you delete your node_modules, your lock and how did you run install?

from wdio-cucumber-framework.

MaheshGooner avatar MaheshGooner commented on September 22, 2024

i think you are right. when i created this ticket i might be using v4 but i migrated later to v5. i see there are issues with the logs but it doesn't stop me from running the tests.

2019-05-22T14:32:50.305Z WARN @wdio/cli: Can't identify message from worker: {"event":"test:pass","cid":"0-0","uid":"I launch OPAP7","title":"I launch OPAP","pending":false,"parent":"Webdriverio Google Launch5","type":"test","file":"src/features/LaunchGoogle.feature","err":{},"duration":4186,"runner":{"0-0":{"maxInstances":5,"browserName":"chrome"}},"specs":["/home/mahesh/Desktop/temp-projs/webdriverio-e2e-tests/src/features/LaunchGoogle.feature"],"tags":[],"keyword":"When "}, ignoring!
2019-05-22T14:32:50.306Z WARN @wdio/cli: Can't identify message from worker: {"event":"test:start","cid":"0-0","uid":"I am on OPAP home page8","title":"I am on OPAP home page","pending":false,"parent":"Webdriverio Google Launch5","type":"test","file":"src/features/LaunchGoogle.feature","err":{},"duration":0,"runner":{"0-0":{"maxInstances":5,"browserName":"chrome"}},"specs":["/home/mahesh/Desktop/temp-projs/webdriverio-e2e-tests/src/features/LaunchGoogle.feature"],"tags":[],"featureName":"Launch OPAP","scenarioName":"Webdriverio Google Launch","keyword":null}, ignoring!
[0-0] 2019-05-22T14:32:50.310Z INFO webdriver: COMMAND findElement("css selector", "span.c-header-desktop__button-text.is-active")
[0-0] 2019-05-22T14:32:50.311Z INFO webdriver: [POST] http://127.0.0.1:4444/wd/hub/session/1ad13efb1d8280496f99693467799bdc/element
[0-0] 2019-05-22T14:32:50.311Z INFO webdriver: DATA { using: 'css selector',
  value: 'span.c-header-desktop__button-text.is-active' }
[0-0] 2019-05-22T14:32:50.349Z INFO webdriver: RESULT { ELEMENT: '0.04306626526895507-1' }
[0-0] 2019-05-22T14:32:50.368Z INFO webdriver: COMMAND findElements("css selector", "span.c-header-desktop__button-text.is-active")
[0-0] 2019-05-22T14:32:50.368Z INFO webdriver: [POST] http://127.0.0.1:4444/wd/hub/session/1ad13efb1d8280496f99693467799bdc/elements
[0-0] 2019-05-22T14:32:50.368Z INFO webdriver: DATA { using: 'css selector',
  value: 'span.c-header-desktop__button-text.is-active' }
[0-0] 2019-05-22T14:32:50.385Z INFO webdriver: RESULT [ { ELEMENT: '0.04306626526895507-1' } ]
2019-05-22T14:32:50.391Z WARN @wdio/cli: Can't identify message from worker: {"event":"test:pass","cid":"0-0","uid":"I am on OPAP home page8","title":"I am on OPAP home page","pending":false,"parent":"Webdriverio Google Launch5","type":"test","file":"src/features/LaunchGoogle.feature","err":{},"duration":86,"runner":{"0-0":{"maxInstances":5,"browserName":"chrome"}},"specs":["/home/mahesh/Desktop/temp-projs/webdriverio-e2e-tests/src/features/LaunchGoogle.feature"],"tags":[],"keyword":"Then "}, ignoring!
2019-05-22T14:32:50.392Z WARN @wdio/cli: Can't identify message from worker: {"event":"suite:end","cid":"0-0","uid":"Webdriverio Google Launch5","title":"Webdriverio Google Launch","pending":false,"parent":"Launch OPAP1","type":"suite","file":"src/features/LaunchGoogle.feature","err":{},"duration":4281,"runner":{"0-0":{"maxInstances":5,"browserName":"chrome"}},"specs":["/home/mahesh/Desktop/temp-projs/webdriverio-e2e-tests/src/features/LaunchGoogle.feature"],"tags":[],"keyword":null}, ignoring!
2019-05-22T14:32:50.392Z WARN @wdio/cli: Can't identify message from worker: {"event":"suite:end","cid":"0-0","uid":"Launch OPAP1","title":"Launch OPAP","pending":false,"parent":null,"type":"suite","file":"src/features/LaunchGoogle.feature","err":{},"duration":4292,"runner":{"0-0":{"maxInstances":5,"browserName":"chrome"}},"specs":["/home/mahesh/Desktop/temp-projs/webdriverio-e2e-tests/src/features/LaunchGoogle.feature"],"tags":[],"keyword":null}, ignoring!
[0-0] 2019-05-22T14:32:50.495Z INFO webdriver: COMMAND deleteSession()
[0-0] 2019-05-22T14:32:50.496Z INFO webdriver: [DELETE] http://127.0.0.1:4444/wd/hub/session/1ad13efb1d8280496f99693467799bdc
[0-0] PASSED in chrome - /src/features/LaunchGoogle.feature
2019-05-22T14:32:50.663Z INFO @wdio/cli:Launcher: Run onComplete hook

Spec Files:      1 passed, 1 total (100% completed) in 00:00:06 

from wdio-cucumber-framework.

abjerstedt avatar abjerstedt commented on September 22, 2024

@MaheshGooner Considering you are using your tests to verify production code, I STRONGLY suggest you rollback to v4 until i complete my PR.

If you are that set on using v5 immediately, you can merge in the changes that i made in my PR to the cucumber-boilerplate, and then pulldown and crosslink my PR into your test repo. That said, my PR requires significant testing and you need to consider this as a pre-alpha release (aka expect bugs).

from wdio-cucumber-framework.

MaheshGooner avatar MaheshGooner commented on September 22, 2024

ok. i will try both the options. Thanks

from wdio-cucumber-framework.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.