[英]Is it posible to programmatically check if the selenium Remote Webdriver Server is running or not
Hi is it possible to check if the Remote webdriver server is running or not using C#. 您好可以使用C#检查远程webdriver服务器是否正在运行。 Pinging the server did not help , Can you tell what type of call should be done and what will be the feedback that we can expect from the server
Ping服务器没有帮助,你能说出应该做什么类型的调用以及我们可以从服务器获得什么反馈
You should really define what you mean by 'running'. 你应该真正定义'跑'的意思。
You can get the general status of the server by chucking a JSON request at it. 您可以通过向其中删除JSON请求来获取服务器的一般状态。
You see the server will implement the Wire Protocol, so it means that it will, or at least should , respond to the following list of REST url's: 您看到服务器将实现有线协议,因此这意味着它将或者至少应该响应以下REST URL列表:
http://code.google.com/p/selenium/wiki/JsonWireProtocol http://code.google.com/p/selenium/wiki/JsonWireProtocol
Specifically: 特别:
http://code.google.com/p/selenium/wiki/JsonWireProtocol#/status http://code.google.com/p/selenium/wiki/JsonWireProtocol#/status
and possibly 可能
http://code.google.com/p/selenium/wiki/JsonWireProtocol#GET_/sessions http://code.google.com/p/selenium/wiki/JsonWireProtocol#GET_/sessions
The status
supposedly, will: 据称,这种
status
将:
The server should respond with a general "HTTP 200 OK" response if it is alive and accepting commands
If this is what you mean by 'running', that it is alive and kicking and willing to accept commands, then you will need to send off a request to /status
and check for the response you get back. 如果你的意思是“跑步”,它是活着的,并且愿意接受命令,那么你需要向
/status
发送请求并检查你得到的回复。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.