With Selenium 1 there was the possibility to enter a URL to stop the server:
http://:/selenium-server/driver/?cmd=shutDown
Is there a similar way in Selenium 2?
I tried the following URL to check whether the server is running:
http://:/wd/hub/
but that only returns an HTTP ERROR 503 (service unavailable). Is there any other URL I can access to verify that the server is running?
Or You can also check with http://localhost:4444/selenium-server/driver/?cmd=getLogMessages If serveris runnning then it will show 'ok' in browser.
find the PID of the process that is bound to port 4444 (use lsof command) send that process a SIGTERM to gracefully shutdown (use the kill command)
To install and start the standalone Selenium Server manually, use the webdriver-manager command line tool, which comes with Protractor. Run the update command: webdriver-manager update This will install the server and ChromeDriver. Run the start command: webdriver-manager start This will start the server.
The Selenium server in 2.0 contains all of the same code that was in Selenium 1, so checking for, say, http://localhost:4444/selenium-server/driver?cmd=getLogMessages
will test for the existence of the server. Likewise, you can issue http://localhost:4444/selenium-server/driver?cmd=shutDownSeleniumServer
to shut the server down.
There was recently a new /status
URL added to the JSON wire protocol used by the 2.0 parts of the server, but I'm not certain it's been implemented in the remote server just yet. This would be accessed by http://localhost:4444/wd/hub/status
, when implemented. Additionally, there isn't yet an equivalent shutdown URL in the wire protocol.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With