Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Using ChromeDriver with WebDriverIO without Selenium

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.

like image 921
oligofren Avatar asked Jun 23 '17 15:06

oligofren


1 Answers

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.

like image 192
oligofren Avatar answered Sep 27 '22 20:09

oligofren