selenium_server_available {selenium} | R Documentation |
Is a selenium server instance running?
Description
selenium_server_available()
returns TRUE
if a Selenium server is
running on a given port and host. wait_for_selenium_available()
waits
for the Selenium server to become available for a given time.
get_server_status()
, when given a port and host, figures out whether a
Selenium server instance is running, and if so, returns its status. This is
used by selenium_server_available()
to figure out if the server is
running.
Usage
selenium_server_available(
port = 4444L,
host = "localhost",
verbose = FALSE,
timeout = 20
)
wait_for_selenium_available(
max_time = 60,
port = 4444L,
host = "localhost",
verbose = FALSE,
timeout = 20,
error = FALSE
)
get_server_status(
port = 4444L,
host = "localhost",
verbose = FALSE,
timeout = 20
)
Arguments
port |
The port that the Selenium server is using, so we can connect to it. |
host |
The host that the Selenium server is running on. This is usually 'localhost' (i.e. Your own machine). |
verbose |
Whether to print information about the web request that is sent. |
timeout |
How long to wait for a request to recieve a response before throwing an error. |
max_time |
The amount of time to wait for the Selenium server to become available. |
error |
Whether to throw an error if the web request throws an error after the timeout is exceeded. By default, a logical value is always returned. |
Value
selenium_server_available()
returns TRUE
if a Selenium server is
running, and FALSE
otherwise, and wait_for_selenium_available()
returns
the same thing.
get_server_status()
returns a list that can (but may not always) contain
the following fields:
-
ready
: Whether the server is ready to be connected to. This should always be returned by the server. -
message
: A message about the status of the server. -
uptime
: How long the server has been running. -
nodes
: Information about the slots that the server can take.
Examples
## Not run:
get_server_status()
selenium_server_available()
wait_for_selenium_available()
## End(Not run)