selenium_server | R Documentation |
Downloads the latest release of Selenium Server, and then runs it as a background process. You must have Java installed for this command to work.
selenium_server(
version = "latest",
selenium_manager = TRUE,
interactive = TRUE,
verbose = TRUE,
temp = TRUE,
path = NULL,
echo_cmd = FALSE,
extra_args = c()
)
version |
The version of Selenium Server to download and run. By default, the latest major or minor release is used. |
selenium_manager |
Whether to enable Selenium Manager, which will
automatically download any missing drivers. Defaults to |
interactive |
By default, if you don't have a version downloaded, you
will be prompted to confirm that you want to download it, and the function
will error if |
verbose |
Passed into |
temp |
Whether to use a temporary directory to download the Selenium
Server |
path |
The path where the downloaded Selenium Server |
echo_cmd |
Passed into processx::process$new(). |
extra_args |
A character vector of extra arguments to pass into the Selenium Server call. See the list of options here: https://www.selenium.dev/documentation/grid/configuration/cli_options/ |
A processx::process object. Call <process>$kill()
to stop the
server.
The package website for more ways to start the Selenium server.
## Not run:
# Disables the prompt that asks you whether you want to download Selenium server
server <- selenium_server(interactive = FALSE)
# Saves the server in your user data directory
server <- selenium_server(temp = FALSE)
server$kill()
# The server doesn't have to be downloaded again
server <- selenium_server(temp = FALSE)
# Here we use extra arguments to increase the timeout of client sessions,
# allowing sessions to stay open for longer without being automatically
# terminated.
server <- selenium_server(extra_args = c("--session-timeout", "3000"))
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.