启动Edge浏览器

时间:2019-08-08 10:03:24

标签: c# selenium visual-studio-2010

边缘浏览器正在启动,但未考虑URL

我试图在Edge浏览器中启动代码,所以请在Initazlizehooks.cs(创建用于初始化所有diff浏览器的类)中更改代码。

代码:

Case BrowserType.Edge: 
  EdgeOptions options4 = new EdgeOptions(); 
  DriverContext.Driver = new EdgeDriver(); 
  DriverContext.Browser = new Browser(DriverContext.Driver); 
  DriverContext.Browser.Maximize(); 
  break;

错误:

A exception with a null response was thrown sending an HTTP request to the remote WebDriver server for URL localhost:52094/session. The status of the exception was ReceiveFailure, and the message was: The underlying connection was closed: An unexpected error occurred on a receive.

0 个答案:

没有答案