Skip to content

Codeceptjs 3.5.12 with Chromedriver and Webdriver helper fails #4182

@wslaghekke

Description

@wslaghekke

What are you trying to achieve?

Testing without selenium as described here: https://codecept.io/webdriver/#chromedriver-without-selenium

What do you get instead?

Codeceptjs fails on an error initializing the webdriver connection.

Error: Can't connect to WebDriver.
Error: Failed to create session.
Make sure to set `path: '/'` in your wdio.conf.js!
# paste output here

Details

  • CodeceptJS version: 3.5.12
  • NodeJS Version:
  • Operating System:
  • webdriverio
  • Configuration file:
{
host: localhost,
port: 9515,
browser: 'chrome',
path: '/',
}

This issues is caused by the following if statement inside the Webdriver helper: https://github.com/codeceptjs/CodeceptJS/blame/eb1125b0962beed937ee741eae4ecdbccd6fb033/lib/helper/WebDriver.js#L497

I'm not sure what the correct fix should be, i have worked around the issue for now by using hostname in my config instead of host, hostname seems to be an undocumented option so i'm not sure how stable that workaround is.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions