【发布时间】:2019-08-07 13:19:30
【问题描述】:
我无法让 chromedriver 在 Windows 7 中工作
应用程序 (c#) 启动 Chrome 驱动程序:
(a)driver = new ChromeDriver();
它工作正常,但在 Windows 7 中除外。在 Windows 7 (64x) 中:
- chromedriver.exe 窗口出现
- 有些延迟
- 然后行 (a) 产生异常:
OpenQA.SeleniumWebDriverException:无法启动驱动程序服务 上...
Chromedriver 日志中什么都没有,除了:
[1565170796.674][INFO]:正在启动 ChromeDriver 76.0.3809.68 (420c9498db8ce8fcd190a954d51297672c1515d5-refs/branch-heads/3809@{#864}) [1565170796.674][INFO]:请保护 ChromeDriver 使用的端口和 相关测试框架,防止恶意代码访问。
我的应用程序不是服务,这不是 Session 0 问题,AFAIK。我尝试过的其他没有帮助的事情:
chromeOptions.BinaryLocation = @"C:\Program Files (x86)\Google\Chrome\Application\chrome.exe"; chromeOptions.AddArgument("no-sandbox");重新安装 Chrome 从 备用安装程序在环境变量更新中设置属性 chromedriver 从 75 到 76
我希望它能够像在 Windows 10 或 8 中一样打开 Chrome。
感谢任何帮助
【问题讨论】:
标签: c# selenium selenium-chromedriver