7

According to the codeception's documentation, you can run tests in Chrome Browser by connecting to the ChromeDriver directly without using Selenium Server.

You first need to install ChromeDriver and then launch it by running the command chromedriver --url-base=/wd/hub.

What is the purpose of --url-base=/wd/hub? Can't find it anywhere.

UPDATE In the ChromeDriver - WebDriver for Chrome documentation, wd/hub is mentioned under the FAQ section without any explanation of what that is.

lomse
  • 4,045
  • 6
  • 47
  • 68
  • This url prefix is used by Selenium, so my guess is that this option makes Chromedriver behave more like Selenium. – Naktibalda Jan 17 '18 at 12:55

1 Answers1

13

The purpose of --url-base is to define the base entry point for all the received commands.

The default entry point with chromedriver is /. For instance to get all the sessions the client would send:

http://localhost:9515/sessions

But by default, the client (RemoteWebDriver) sends the commands to /wd/hub:

http://localhost:9515/wd/hub/sessions

Thus you need to set this flag so that the client can communicate with chromedriver.

Florent B.
  • 41,537
  • 7
  • 86
  • 101