Selenium报错:Unable to obtain chrome using Selenium Manager求助
Selenium ChromeDriver初始化报错问题求助
我知道本站及其他平台上已有许多关于使用Selenium管理Chrome时出现该报错的旧帖,但我始终无法让一段基础的PowerShell脚本正常运行。我已多次检查,确认所有前置条件都已满足、所需文件位置正确,也没有遗漏低级错误,但问题仍未解决。
基础PowerShell代码
$workingPath = "D:\Dev\Selenium" Add-Type -Path "$($workingPath)\lib\netstandard2.0\WebDriver.dll" $SiteUrl = "www.google.com" $chromeDriver = New-Object OpenQA.Selenium.Chrome.ChromeDriver $chromeDriver.Navigate().GoToURL($siteURL)
运行报错信息
Error: Exception calling ".ctor" with "0" argument(s): "Unable to obtain chrome using Selenium Manager; For documentation on this error, please visit: https://www.selenium.dev/documentation/webdriver/troubleshooting/errors/driver_location" At line:5 char:13 + throw "Error: $($_.Exception.Message)"} + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + CategoryInfo : OperationStopped: (Error: Exceptio...river_location":String) [], RuntimeException + FullyQualifiedErrorId : Error: Exception calling ".ctor" with "0" argument(s): "Unable to obtain chrome using Selenium Manager; For documentation on this error, please visit: https:// www.selenium.dev/documentation/webdriver/troubleshooting/errors/driver_location"
这是一个常见报错,Selenium有专门的文档页面,但内容实用性不高,网上也有很多相关案例,不过我的问题依然存在。
为证明已满足前置条件,我编写了一段基础PS脚本并运行,相关系统信息截图如下:
我实在不知道还能做什么,恳请各位提供建议。
内容的提问来源于stack exchange,提问作者sbagnato
相关产品推荐
相关产品推荐

