Rselenium not working

限于喜欢 提交于 2019-12-11 00:17:18

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!