我正在使用selenium remotedriver(带有C#)进行镶边和边缘处理。这些测试在chrome浏览器上似乎运行良好,但在边缘上却没有。 Edge已启动,但无法导航到指定的uri。
我试图确保我具有与安装的edge版本相同的webdriver版本,我在Windows 10上因此已经打开。
var options = new EdgeOptions();
options.PageLoadStrategy = PageLoadStrategy.Eager;
_driver = new EdgeDriver(driverPath,options);
_driver.Manage().Timeouts().PageLoad = TimeSpan.FromSeconds(5);
_driver.Navigate().GoToUrl("www.google.com");
The image contains the nuget packages added to the project 已安装Microsoft Edge 44.18362.329.0。任何帮助将不胜感激。
答案 0 :(得分:0)
我尝试使用Microsoft Edge 44.18362.1.0,Windows 10,Selenium Web驱动程序版本V3.141.0来测试此问题
经过测试的代码:
class Program
{
private static StringBuilder verificationErrors;
[Obsolete]
static void Main(string[] args)
{
var options = new EdgeOptions();
options.PageLoadStrategy = PageLoadStrategy.Eager;
IWebDriver driver = new EdgeDriver(options);
driver.Navigate().GoToUrl("www.google.com");
}
}
代码在我这方面工作正常,打开网页没有任何问题。
输出:
我可以在包管理器中看到Web驱动程序的各种条目。
我建议您仅在新的单独项目中安装Selenium Web驱动程序v3.141.0,然后尝试在其中运行此代码以检查它是否有助于解决问题。
如果它解决了问题,那么从项目中删除不必要的条目可能有助于解决您的问题。