selenium_server {selenium}R Documentation

Download and start the Selenium server.

Description

[Experimental]

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.

Usage

selenium_server(
  version = "latest",
  selenium_manager = TRUE,
  interactive = TRUE,
  verbose = TRUE,
  temp = TRUE,
  path = NULL,
  echo_cmd = FALSE,
  extra_args = c()
)

Arguments

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 TRUE.

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 rlang::is_interactive() returns FALSE. To allow this function to work in a non-interactive setting, set this to FALSE.

verbose

Passed into utils::download.file(). Note that setting this to FALSE will not disable the prompt if a file needs to be downloaded.

temp

Whether to use a temporary directory to download the Selenium Server .jar file. This will ensure that the file is deleted after it is used, but means that you will have to redownload the file with every new R session. If FALSE, the file is saved in your user data directory.

path

The path where the downloaded Selenium Server .jar file will be saved. Overrides temp.

echo_cmd

Passed into processx::process$new().

extra_args

A character vector of extra arguments to pass into the Selenium Server call.

Value

A processx::process object. Call ⁠<process>$kill()⁠ to stop the server.

See Also

The package website for more ways to start the Selenium server.

Examples


server <- selenium_server(interactive = FALSE)

server$kill()


[Package selenium version 0.1.3 Index]