Learn R Programming

RSelenium (version 1.7.7)

startServer: Start the standalone server.

Description

Defunct. Please use rsDriver

Usage

startServer(dir = NULL, args = NULL, javaargs = NULL, log = TRUE, ...)

Value

Returns a list containing two functions. The 'getpid' function returns the process id of the started Selenium binary. The 'stop' function stops the started Selenium server using the process id.

Arguments

dir

A directory in which the binary is to be placed.

args

Additional arguments to be passed to Selenium Server.

javaargs

arguments passed to JVM as opposed to the Selenium Server jar.

log

Logical value indicating whether to write a log file to the directory containing the Selenium Server binary.

...

arguments passed system2. Unix defaults wait = FALSE, stdout = FALSE, stderr = FALSE. Windows defaults wait = FALSE, invisible = TRUE.

Detail

By default the binary is assumed to be in the RSelenium package /bin directory. The log argument is for convenience. Setting it to FALSE and stipulating args = c("-log /user/etc/somePath/somefile.log") allows a custom location. Using log = TRUE sets the location to a file named sellog.txt in the directory containing the Selenium Server binary.

Details

startServer A utility function to start the standalone server. Return two functions see values.

Examples

Run this code
if (FALSE) {
selServ <- startServer()
# example of commandline passing
selServ <- startServer(
  args = c("-port 4455"),
  log = FALSE,
  invisible = FALSE
)
remDr <- remoteDriver(browserName = "chrome", port = 4455)
remDr$open()
# get the process id of the selenium binary
selServ$getpid()
# stop the selenium binary
selServ$stop()
}

Run the code above in your browser using DataLab