
[英]Selenium with Microsoft Edge driver never finishes initialising
[英]Microsoft Web Driver has stopped working. A problem cause the program to stop working correctly error using EdgeDriver and Microsoft Edge in Selenium
如何在 Selenium 中运行 Microsoft Edge。 每次运行测试时,Edge 浏览器都会打开,但不会加载任何 URL。 然后它会显示一个带有文本的小对话框:
Microsoft Web Driver has stopped working. A problem cause the program to stop working correctly. Please close the program
我在用:
代码试用:
using OpenQA.Selenium.Edge;
driver = new EdgeDriver();
这个错误信息...
Microsoft Web Driver has stopped working. A problem cause the program to stop working correctly. Please close the program
...暗示MicrosoftWebDriver无法启动/生成新的浏览上下文,即Microsoft Edge 浏览器会话。
当您使用Microsoft Edge Browser Version 18.17763
,根据使用新的 WebDriver 功能、W3C 协议支持和自动更新增强 Microsoft Edge 中的自动化测试中的文档,现在 MicrosoftWebDriver 是Windows 按需功能 (FoD) ,可确保它是始终自动更新,并启用一些新方法来获取 Microsoft WebDriver。
启用开发人员模式,这将安装适当版本的 WebDriver。
Open Settings app > Go to Update & Security > For Developer and then select "Developer Mode".
您还可以通过以下两种方式之一安装独立版本的 WebDriver:
通过在提升的命令提示符中运行以下命令,通过 DISM 进行安装:
DISM.exe /Online /Add-Capability /CapabilityName:Microsoft.WebDriver~~~~0.0.1.0
注意:通过DISM
命令安装MicrosoftWebDriver 时,默认情况下 webdriver 安装在以下子目录中:
64 位:
C:\\\\Windows\\\\SysWOW64\\\\MicrosoftWebDriver.exe
32 位:
C:\\\\Windows\\\\System32\\\\MicrosoftWebDriver.exe
截至 2018 年 10 月 10 日的Windows 更新(10/2018,内部版本 17763),EdgeHTML 18 包括以下 Microsoft Edge 平台当前版本中提供的新功能和更新功能。 有关特定Windows Insider Preview 版本的更改,请参阅Microsoft Edge 更改日志和EdgeHTML 中的新增功能。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.