How can I start InternetExplorerDriver using Selenium WebDriver

前端 未结 16 2448
半阙折子戏
半阙折子戏 2020-12-30 17:23

I downloaded the driver and I gave the exact path in my code but when I ran the code it shows me error

my code with java is as below:

System.out.prin         


        
16条回答
  •  礼貌的吻别
    2020-12-30 17:47

    Below steps are worked for me, Hope this will work for you as well,

    1. Open internet explorer.
    2. Navigate to Tools->Option
    3. Navigate to Security Tab
    4. Click on "Reset All Zones to Default level" button
    5. Now for all option like Internet,Intranet,Trusted Sites and Restricted Site enable "Enable Protected" mode check-box.
    6. Set IE zoom level to 100%
    7. then write below code in a java file and run

      System.setProperty("webdriver.ie.driver","path of your IE driver exe\IEDriverServer.exe");
      InternetExplorerDriver driver=new InternetExplorerDriver();
      driver.manage().window().maximize();
      Thread.Sleep(10100);
      driver.get("http://www.Google.com");
      Thread.Sleep(10000);
      

提交回复
热议问题