0

I try to run RSelenium using the following:

library("RSelenium")
#start RSelenium server
rD <- rsDriver(verbose = FALSE)
remDr <- rD$client
remDr$open()

However, in rsDriver(), I receive this error:

Selenium message:The driver executable does not exist: C:\Users\kira\Documents

Error:   Summary: UnknownError
     Detail: An unknown server-side error occurred while processing the command.
     class: java.lang.IllegalStateException
     Further Details: run errorDetails method

I have download the standalone jar of Selenium and put it into the path but the error does not disappear. Any other workarounds?

Tamás Sengel
  • 55,884
  • 29
  • 169
  • 223
Sasak
  • 189
  • 5
  • 15

1 Answers1

0

From the docs, it looks like you should be starting the server from the command terminal. Of course, you can do this from R with the system2 command, but probably easier to start the jar from a terminal first for debugging.

Alternatively you can run the binary manually. Open a console in your OS and navigate to where the binary is located and run:

java -jar selenium-server-standalone-x.xx.x.jar

By default the Selenium Server listens for connections on port 4444.

Note for Mac OSX: The default port 4444 is sometimes used by other programs such as kerberos. In our examples we use port 4445 in respect of this and for cdonsistency with the Docker vignette.

Afterwards, connecting from R:

remDr <- remoteDriver(remoteServerAddr = "localhost" 
                      , port = 4444L
                      , browserName = "firefox"
                      )

remDr$open()

remDr$getStatus()
cole
  • 1,737
  • 2
  • 15
  • 21
  • Thank you I run the executable jar from cmd I will try port 4444 but until now I was running Rselenium without need to run first the executable – Sasak Jul 28 '17 at 11:23
  • You're right, `rsDriver` is a wrapper I was unfamiliar with. Can you turn on `verbose=TRUE` and include the output, so we get a bit more detail about what is going on? – cole Jul 28 '17 at 11:48