1
IWebDriver driver1 = new InternetExplorerDriver(" '+ Server.MapPath("~\\IEDriverServer_Win32_2.25.2\\IEDriverServer.exe") +' ");

找不到驱动程序错误?我正在使用 ASP.NET,C#。任何帮助..

谢谢,

4

1 回答 1

0

你可以尝试这样的事情: -

  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
于 2012-11-08T17:14:59.667 回答