IWebDriver driver1 = new InternetExplorerDriver(" '+ Server.MapPath("~\\IEDriverServer_Win32_2.25.2\\IEDriverServer.exe") +' ");
找不到驱动程序错误?我正在使用 ASP.NET,C#。任何帮助..
谢谢,
你可以尝试这样的事情: -
private const string URL = "http://url";
private const string IE_DRIVER_PATH = @"C:\PathTo\IEDriverServer";
[TestMethod]
public void Test()
{
var options = new InternetExplorerOptions()
{
InitialBrowserUrl = URL,
IntroduceInstabilityByIgnoringProtectedModeSettings = true
};
var driver = new InternetExplorerDriver(IE_DRIVER_PATH, options);
driver.Navigate();
driver.Close();
driver.Quit();
}
你必须包括Microsoft.VisualStudio.TestTools.UnitTesting
和
OpenQA.Selenium.IE namespace