I am trying to open a remote driver using the RSelenium package with Chrome driver and encountering the following error:
>> library("XML")
>> library('RSelenium')
>> checkForServer()
Warning message:
In order(as.numeric(gsub("(.*)/.*", "\\1", selJAR)), decreasing = TRUE) :
NAs introduced by coercion
>> startServer()
Warning message:
running command 'java -jar "C:/Users/Jessica/Documents/R/win-library/3.4/RSelenium/bin/selenium-server-standalone.jar"'
had status 127
>> remDr=remoteDriver$new()
>> remDr$open() # open web browser
[1] "Connecting to remote server"
Error in function (type, msg, asError = TRUE) :
Failed to connect to localhost port 4444: Connection refused
But it seems that I am having a difficult time establishing a connection.
I think the error message after the startServer()
is implying that R is unable to establish a serenium server.
One way I tried to resolve the issue is by copying both the selenium-server-standalone.jar and chromedriver.exe files into the document folder so R can find them. But so far no luck in establishing a server. What am I missing? I appreciate your help.