6

I want to drive my webdriverio tests with ChromeDriver, without going by Selenium. That should be possible, it seems, but I am not sure where to start.

I have tried starting up ChromeDriver like this

chromedriver

and then in another Window I have started up the wdio testrunner like this:

$(npm bin)/wdio 

If doing nothing this will just get me

ERROR: connect ECONNREFUSED 127.0.0.1:4444

Changing the port in the wdio.conf.js to match the ChromeDriver's port 9515 gets me

ERROR: unknown command: wd/hub/session

I have tried adding --url-base=wd/hub/session to the chromedriver startup options, but it just changes the error to

ERROR: unhandled request

Still, no go. I have set the services property for wdio to ['chromedriver'] - but it does not seem to take effect.

oligofren
  • 15,352
  • 12
  • 75
  • 134

2 Answers2

9

It turns out that I failed to follow one vital bit of information:

path: '/'

From the docs

path

Path to WebDriver server.

Type: String

Default: /wd/hub

This is the address the Chromedriver is listening to.

Community
  • 1
  • 1
oligofren
  • 15,352
  • 12
  • 75
  • 134
0

Try to use wdio-chromedriver-service. It was developed to be able to run Chromedriver without Selenium server.

Link to npm registry: https://www.npmjs.com/package/wdio-chromedriver-service.

Andrii
  • 357
  • 2
  • 9