startServer: Start the standalone server.

Description Usage Arguments Details Value Detail Examples

View source: R/util.R

Description

Defunct. Please use rsDriver

Usage

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

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.

Details

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

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.

Detail

By default the binary is assumed to be in the RSelenium package /bin directory. The log argument is for convience. 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.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
## Not run: 
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()

## End(Not run)

JohanHJH/RSelenium documentation built on May 22, 2019, 5:36 p.m.