【发布时间】:2019-04-09 15:16:32
【问题描述】:
我尝试在 Win10 上使用 Chrome 浏览器在 R 中连接 Selenium。
我安装了 Chrome 74.0.3729.61 并将 chrome.exe 路径添加到环境变量中。
devtools::install_github("johndharrison/seleniumPipes")
devtools::install_github("ropensci/Rselenium")
#start selenium
selServ <- selenium()
# check ports
selServ$log()$stderr
# conect using port
sel <- remoteDr(browserName = "chrome", port = 4567)
给我以下错误信息:
Called newSession - Try no: 1 of 3
Called newSession - Try no: 2 of 3
Called newSession - Try no: 3 of 3
Error detected:
Response status code : 500
Selenium Status code: 13
Selenium Status summary: UnknownError
Selenium Status detail: An unknown server-side error occurred while processing the command.
Selenium message: unknown error: cannot find Chrome binary
(Driver info: chromedriver=74.0.3729.6 (255758eccf3d244491b8a1317aa76e1ce10d57e9-refs/branch-heads/3729@{#29}),platform=Windows NT 10.0.17134 x86_64) (WARNING: The server did not provide any stacktrace information)
Command duration or timeout: 40 milliseconds
Build info: version: '3.141.59', revision: 'e82be7d358', time: '2018-11-14T08:25:53'
System info: host: ... , os.name: 'Windows 10', os.arch: 'amd64', os.version: '10.0', java.version: '1.8.0_201'
Driver info: driver.version: unknown
Please check the response with errorResponse()
Please check the content returned with errorContent()
我找到了一些 Python (Cannot find Chrome binary with Selenium in Python for older versions of Google Chrome) 和 c# (Selenium WebDriver - Could not find Chrome binary) 的指南,但是我不知道如何在 R 中实现它。
【问题讨论】:
标签: r selenium selenium-chromedriver rselenium