How to fix the slow sendkeys on IE 11 with Selenium Webdriver 3.0.0?

后端 未结 11 474
无人共我
无人共我 2020-12-10 17:19

Firefox and chrome is working fine but with IE 11, the sendkeys are extremely slow. How do you fix this issue ?

My Environment:

  • Running IE 11.103
11条回答
  •  暖寄归人
    2020-12-10 17:45

    Better Solution:

    Take note: I have reset all my IE settings before doing this solution, also in my first answer I was running a much older version of IE driver.

    1. Download the latest IE driver - I have downloaded version 3.4 32 bit (the 64 bit was still slow when I was testing it) http://selenium-release.storage.googleapis.com/index.html?path=3.4/

    2. You will need to change your IE settings 2.1 Go to Tools -> Internet Options -> Security. Set all zones to the same protected mode, enabled or disabled should not matter. Like this: http://seleniumquery.github.io/images/ie-driver-protected-mode-disable.png

    3. Now in you code add this:

      public static void runInternetExplorer() {
      
      System.setProperty("webdriver.ie.driver", "C:\\eclipse\\webdriver\\IE\\IEDriverServer.exe");
      
      WebDriver webDriver = new InternetExplorerDriver();
      new browser (webDriver);
      

      }

    When I run this, it run very nicely. I have left my previous answer if this solution isn't working.

提交回复
热议问题