Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What is the purpose of --url-base=/wd/hub when starting chromedriver server?

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.

like image 504
lomse Avatar asked Jan 17 '18 10:01

lomse


1 Answers

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.

like image 85
Florent B. Avatar answered Oct 12 '22 11:10

Florent B.