Liz Young
Liz Young

Reputation: 408

RSelenium Invalid call to server

when I run the introductory code in R,

require(RSelenium)
remDr <- remoteDriver(remoteServerAddr = "localhost", port = 4444, browserName = "chrome")

remDr$navigate("http://www.google.com")

I get the error

Invalid call to server. Please check you have opened a browser.

Error in queryRD(paste0(serverURL, "/session/", sessionInfo$id, "/url"), :

sessionInfo() :

R version 3.1.2 (2014-10-31)
Platform: x86_64-w64-mingw32/x64 (64-bit)

locale:
[1] LC_COLLATE=English_United States.1252 
[2] LC_CTYPE=English_United States.1252   
[3] LC_MONETARY=English_United States.1252
[4] LC_NUMERIC=C                          
[5] LC_TIME=English_United States.1252    

attached base packages:
[1] stats     graphics  grDevices utils     datasets  methods   base     

other attached packages:
[1] RSelenium_1.3.5 XML_3.98-1.1    RJSONIO_1.3-0   RCurl_1.95-4.5 
[5] bitops_1.0-6   

loaded via a namespace (and not attached):
[1] caTools_1.17.1 tools_3.1.2   

Upvotes: 1

Views: 753

Answers (1)

Liz Young
Liz Young

Reputation: 408

I added the line

remDr$open()

between the remoteDriver assignment and the remDr$navigate() command, in addition to editing the system path, and was able to achieve success.

Upvotes: 1

Related Questions