问题
I'm trying to install Rselenium
and I get this
Connecting to remote server"
Error: Summary: UnknownError
Detail: An unknown server-side error occurred while processing the command.
class: java.net.ConnectException"
Code which I have tried is
install.packages("RSelenium")
library(RSelenium)
startServer()
checkForServer()
mybrowser <- remoteDriver(browserName = "chrome")
mybrowser$open()
mybrowser$navigate("http://www.weather.gov")
回答1:
Sometime I face a connection problem. Here what I make:
library("RSelenium")
startServer()
checkForServer()
remDr <- remoteDriver()
remDr$open()
remDr$navigate("http://www.weather.gov")
Sys.sleep(5)
I leave remoteDriver()
which is the Firefox. However sometimes when I run the code I receive a connection problem. As a workaround I open the firefox on my own and after that I run the code and the code runs successfully.
回答2:
Note: I would have made a comment, but I don't have 50 rep yet
I've had problems with this in the past (see here). It has to do with opening the server, if you click manually on the server file (something like selenium-server-standalone-2.48.2.jar
), then run your code again, it should work.
来源:https://stackoverflow.com/questions/34366285/rselenium-not-working