带有Microsoft Edge的Selenium驱动程序永远不会完成初始化 [英] Selenium with Microsoft Edge driver never finishes initialising
问题描述
我正在使用Selenium的C#绑定,并试图在Microsoft Edge中获得一个简单的自动化测试.
I'm using the C# bindings for Selenium and trying to get a simple automated test in Microsoft Edge working.
class Program
{
static void Main(string[] args)
{
EdgeOptions options = new EdgeOptions();
options.PageLoadStrategy = EdgePageLoadStrategy.Eager;
RemoteWebDriver driver = new EdgeDriver();
driver.Url = "http://bing.com/";
}
}
但是程序在EdgeDriver初始化时停止,边缘浏览器启动,但URL从未更改为"bing.com".
But the program halts on the initialisation of the EdgeDriver, the edge browser launches but the url never changes to "bing.com".
还有其他人经历过吗?
推荐答案
我也遇到了同样的问题.我按照以下步骤解决了它:-
I have faced the same issue. I followed the below steps to resolve it :-
为服务器下载正确的 Microsoft WebDriver
服务器版本您的构建.
Download the correct Microsoft WebDriver
server version for your build.
如何找到正确的内部版本号:-
How to find your correct build number :-
1-转到开始>设置>系统> 关于,然后在屏幕上找到OS Build旁边的数字.这是您的内部版本号.为您的构建使用正确版本的WebDriver可以确保其正确运行.
1- Go to Start > Settings > System > About and locate the number next to OS Build on the screen. This is your build number. Having the correct version of WebDriver for your build ensures it runs correctly.
2-运行此命令systeminfo | findstr /B /C:"OS Version"
,这将给出与OS Version: 10.0.10586 N/A Build 10586
类似的输出.这是内部版本号为10586
2- Run this command systeminfo | findstr /B /C:"OS Version"
this will give the output like OS Version: 10.0.10586 N/A Build 10586
. Here is build number is 10586
您需要检查 Windows操作系统 build number
和 download
合适的.msi
并安装它.
You need to check your Windows OS build number
and download
appropriate .msi
and install it.
提供将MicrosoftWebDriver.exe
安装到webdriver.edge.driver
的Syetem
属性.
注意:-MicrosoftWebDriver.exe
的默认安装位置:-
for 64 bit is C:\Program Files (x86)\Microsoft Web Driver
for 32 bit is C:\Program Files\Microsoft Web Driver
希望它会起作用...:)
Hope it will work...:)
这篇关于带有Microsoft Edge的Selenium驱动程序永远不会完成初始化的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!