selenium - 如何使用 Selenium 使用 ChromeDriver 运行 Chrome Beta 版?
问题描述
我正在尝试使用 selenium Web-driver 运行 chrome beta 版本。当我运行测试用例时,我在控制台上收到以下错误,请参见图片:
我在节点配置文件中添加了以下几行:
{
"capabilities": [
{
"platform": "WINDOWS",
"browserName": "chrome",
"webdriver.chrome.driver":"drive:\selenium\chromedriver.exe",
"chromeOptions": "drive:\Program Files (x86)\Google\Chrome Beta\Application\chrome.exe",
}
]
我正在使用以下设置:
Selenium=2.53
chrome Web-driver= 80_0_3987_16
Google chrome= 80.0.3987.66 (Official Build) beta (64-bit)
我们有从 GO cicd 服务器执行的集线器和节点设置和自动化测试套件。任何帮助将不胜感激,谢谢
解决方案
这对我有用
chrome_options.binary_location = "C:/Program Files/Google/Chrome Beta/Application/chrome.exe"
推荐阅读
- javascript - 在 ReactJs 中使用带有 setState 的 onclick 功能时,如何传递参数?
- powershell - 传递 Cmdlet 名称和参数的 Invoke-Command 包装函数
- html - 在移动浏览器中隐藏工具栏时使高度为 100%
- docker - 直接挂载的 NFS 卷上的 persistentVolumeReclaimPolicy - kubernetes
- javascript - 开玩笑抛出错误>类型错误:无法读取属性'user_env_variable是未定义的
- python - 从网页收集并打印事件标题
- android - 带有标签和 ViewPager 的 Android AppBarLayout
- php - laravel 500 错误:此页面无法正常工作
- .net - 达到 .NET 字典的限制——究竟是什么?
- javascript - 如何遍历 javascript 属性但跳过其中的函数?