How can I start InternetExplorerDriver using Selenium WebDriver

前端 未结 16 2686
半阙折子戏
半阙折子戏 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:50

    I've been firefighting with this issue for the past one month. And finally I found a fruitful solution. Here are the exact steps which we followed to get it worked. I have already done Required Configuration as mentioned in this link: https://github.com/SeleniumHQ/selenium/wiki/InternetExplorerDriver#required-configuration

    1. Make the internet explorer protected mode settings enable/disable for all the zones. (In my case I enabled across all the zones, doesn't matter about the levels). If your organisation not allow these settings, the other solution is to create a group at active directory level and enforce our expected internet explorer settings for that group. Add your user name to that group.
    2. Install IE Webdriver tool for windows from the below link. This is from Microsoft. No need to restart your machine after installation https://www.microsoft.com/en-au/download/details.aspx?id=44069
    3. Use these Desired Capabilities for your internet explorer driver

      DesiredCapabilities capabilities = DesiredCapabilities.internetExplorer();
      capabilities.setCapability("requireWindowFocus", true);  
      capabilities.setCapability(InternetExplorerDriver.IGNORE_ZOOM_SETTING, false);
      capabilities.setCapability("ie.ensureCleanSession", true);
      

      capabilities.setCapability(InternetExplorerDriver.INTRODUCE_FLAKINESS_BY_IGNORING_SECURITY_DOMAINS, true); capabilities.setCapability(InternetExplorerDriver.FORCE_CREATE_PROCESS, true); webDriver = new InternetExplorerDriver(capabilities);

    4. Use appropriate selenium version 2.53.1. I got it worked for the selenium version as mentioned in pom

      
          org.seleniumhq.selenium
          selenium-java
          2.53.1
      
      
    5. Download the IEDriverServer_x64_2.53.1.zip from the below link. Make sure its 2.53.1 http://selenium-release.storage.googleapis.com/index.html?path=2.53/

    6. Now go to registry settings (regedit.exe) for the current user (Don't open regedit as an Administrator) and add TabProcGrowth for the below path in regedit

    HKEY_CURRENT_USER\Software\Microsoft\Internet Explorer\Main

    Right click on Main and add new DWORD (32 bit) and make it as 0. Remember I tried 64 bit with QWORD it didn't worked for me.

    The key in this process is Step 2 which is Install IE Webdriver tool for windows

    I didn't tried this method for Selenium latest version 3.0 but will give a try.

提交回复
热议问题