Is it posible to programmatically check if the selenium Remote Webdriver Server is running or not

StackOverflow https://stackoverflow.com/questions/15336599

  •  23-03-2022
  •  | 
  •  

Hi is it possible to check if the Remote webdriver server is running or not using C#. 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

有帮助吗?

解决方案

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.

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:

http://code.google.com/p/selenium/wiki/JsonWireProtocol

Specifically:

http://code.google.com/p/selenium/wiki/JsonWireProtocol#/status

and possibly

http://code.google.com/p/selenium/wiki/JsonWireProtocol#GET_/sessions

The status supposedly, will:

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.

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top