开发者

Selenium 2: How to check that server is running and stop the server?

With Selenium 1 th开发者_开发技巧ere 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?


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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜