使用RSelenium打开chrome浏览器,得到“无法创建新服务:ChromeDriverService",信息和错误 [英] Using RSelenium to open chrome browser, getting "Unable to create new service: ChromeDriverService" message and error
问题描述
正如标题所述,我有一个使用RSelenium编写的脚本,用于使用chrome作为浏览器来自动进行Web导航.这个脚本已经运行了好几个月了,但是今天当我尝试运行它时,我收到了以下消息:
As the title says, I've got a script written using RSelenium to automate web navigation, using chrome as the browser. This script has worked fine for months now, but today when I tried to run it, I got the following message:
Selenium message:Unable to create new service: ChromeDriverService
Build info: version: '3.14.0', revision: 'aacccce0', time: '2018-08-
02T20:13:22.693Z'
System info: host: 'LAPTOP-22QM8890', ip: '192.168.133.65', os.name:
'Windows 10', os.arch: 'amd64', os.version: '10.0', java.version: '1.8.0_171'
Driver info: driver.version: unknown
Could not open chrome browser.
Client error message:
Summary: SessionNotCreatedException
Detail: A new session could not be created.
Further Details: run errorDetails method
Check server log for further details.
我很确定我已经安装了最新版本的Chrome和ChromeDriver,但这并没有改变任何内容.我不知道今天是什么原因导致此错误自发出现.
I'm pretty sure that I have installed the latest versions of Chrome and ChromeDriver, but this has not changed anything. I'm at a loss as to what caused this error to spontaneously appear today.
推荐答案
如果使用的是Windows,只需进入C:\ Users \ Jeff \ AppData \ Local \ binman并删除其中的所有目录(对我来说,包括seleniumserver在内的4个目录和geckodriver).然后只需打开RStudio并运行例如
If you are using windows, just go inside C:\Users\Jeff\AppData\Local\binman and delete all directories inside (for me 4 directories including seleniumserver and geckodriver). Then just open RStudio and run eg
library(RSelenium)
rD <- rsDriver(browser = "chrome")
remDr <- rD$client
remDr$navigate("https://google.com")
祝你好运.
这篇关于使用RSelenium打开chrome浏览器,得到“无法创建新服务:ChromeDriverService",信息和错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!