I am trying to get the Selenium server up and running. However, when I type:
java -jar selenium-server-standalone-2.0b3.jar
I get an Exception:
Selenium is already running on port 4444. Or some other service is.
I have tried to stop it, just in case it really is running:
http://localhost:4444/selenium-server/driver/?cmd=shutDown
That gets me the message:
ERROR Server Exception: sessionId should not be null; has this session been started yet?
If I just write:
http://localhost:4444/
I get:
HTTP ERROR: 403
Forbidden for Proxy
Ideas?
According to this answer you can also hit a URL ( http://localhost:4444/selenium-server/driver?cmd=shutDownSeleniumServer ) at the end of your test to shutdown the Selenium server.
is the command to close the opened selenium session. If the session is opened using batch file please remove the '@pause' command if its is used. This is useful when we are trying to stop and start the server during or in between test case execution. "Ctrl + C" is the best option.
This worked for me:
http://localhost:4444/selenium-server/driver/?cmd=shutDownSeleniumServer
If selenium server is already running on port 4444 then it will shut down the server and says OKOK if selenium is not running on this port 4444 then by hitting above url will give you "Unable to connect"
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