我的操作系统是windows 8.1,R的版本是3.3.3。
我已经安装了 RSelenium 软件包,并尝试使用以下命令运行它:
library("RSelenium")
#start RSelenium server
startServer()
checkForServer()
我收到此错误:
Error: checkForServer is now defunct. Users in future can find the function in
file.path(find.package("RSelenium"), "examples/serverUtils"). The
recommended way to run a selenium server is via Docker. Alternatively
see the RSelenium::rsDriver function.
RSelenium 的打开方式有什么变化吗?我搜索错误,只发现this https://github.com/ropensci/RSelenium/blob/master/R/util.R但这对我没有帮助。我能做些什么?
我尝试的另一种选择是从这里下载 chromedriver 'https://sites.google.com/a/chromium.org/chromedriver/downloads https://sites.google.com/a/chromium.org/chromedriver/downloads'
并使用这个脚本:
需要(RSelenium)
cprof
require(RSelenium)
remDr <- remoteDriver(remoteServerAddr = "localhost"
, port = 4444
, browserName = "chrome", extraCapabilities = cprof
)
remDr$open()
我收到此错误:
Error in checkError(res) :
Couldnt connect to host on http://localhost:4444/wd/hub.
Please ensure a Selenium server is running.
我该怎么做才能运行 chrome 而不是默认浏览器 Firefox?