2017-03-09 19 views
0

我遇到了以下错误:铬司机例外Start(开始)

An administrator has installed Google Chrome on this system, and it is available for all users. The system-level Google Chrome will replace your user-level installation now.

当试图在Windows上运行10铬驱动程序测试这种情况发生时,它开始初始化驱动程序。有没有人遇到过这个问题?

回答

1

出现此错误时,谷歌Chrome适用于所有用户。默认情况下,当谷歌浏览器安装时,它安装在AppData文件夹中,因此它不需要管理员权限来安装

导航到:

C:\Users\yourusername\AppData\Local\Google\Chrome

在哪里,你应该找到一个叫做应用程序文件夹。删除文件夹并重试。

1

尝试从两个目录

c:\Users\user_name\AppData\Local\Google\Chrome\ 
c:\Program Files (x86)\Google\Chrome\ 

而且卸载Chrome,如果它不工作,然后尝试下面的链接。

Unable to Launch Chrome Browser in Selenium

基于上面的链接,你可以设置Chrome二进制文件作为

ChromeOptions options = new ChromeOptions(); 
options.setBinary("path\\to\\chrome.exe"); 

见ChromeOptions文档:

https://sites.google.com/a/chromium.org/chromedriver/capabilities#TOC-Using-a-Chrome-executable-in-a-non-standard-location