簡體   English   中英

使用RSelenium打開Chrome瀏覽器,收到“無法創建新服務:ChromeDriverService”消息和錯誤

[英]Using RSelenium to open chrome browser, getting “Unable to create new service: ChromeDriverService” message and error

就像標題所說的那樣,我有一個使用RSelenium編寫的腳本,使用chrome作為瀏覽器來自動執行Web導航。 這個腳本已經運行了好幾個月了,但是今天當我嘗試運行它時,收到了以下消息:

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,但這並沒有改變任何內容。 我不知道今天是什么原因導致此錯誤自發出現。

如果您使用的是Windows,只需進入C:\\ Users \\ Jeff \\ AppData \\ Local \\ binman並刪除其中的所有目錄(對我來說,包括seleniumserver和geckodriver在內的4個目錄)。 然后只需打開RStudio並運行例如

library(RSelenium)
rD <- rsDriver(browser = "chrome")
remDr <- rD$client
remDr$navigate("https://google.com")

祝好運。

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM