Selenium in C# when run the test case with IE browser

This question already has an answer here:

  • Not able to launch IE browser using Selenium2 (Webdriver) with Java 8 answers

  • Once you've downloaded IEDriverServer_x64_2.53.0.zip , extract the zips to a local drive on your computer.

    Make sure to add the path to where you extracting the IEDriverServer.exe

    using OpenQA.Selenium;
    using OpenQA.Selenium.IE;
    using OpenQA.Selenium.Support.UI;
    
    IWebDriver driver = new InternetExplorerDriver(@"pathtowhere you extracting the IEDriverServer");
    driver.Navigate().GoToUrl("http://www.google.com");
    

    Note :- I'm suggesting you download 32-bit IEDriverService.exe because 64-bit IEDriverService.exe is very very slow for execution.

    Hope it helps...:)


    You have to Place the IEDriverServer.exe in the Bin directory in c#. I guess in Java you need to Add the path of the IEDriverServer.exe in the Path environment variables.

    链接地址: http://www.djcxy.com/p/63422.html

    上一篇: 测试执行不与Nunit,Selenium和C#一起运行

    下一篇: 使用IE浏览器运行测试用例时,C#中的Selenium