Selenium WebDriver typing very slow in text field on IE browser

I'm running one of my scripts on IE 11 browser with Selenium 2.43.1 when the script types in text field using following:

element.sendKeys("string");

In IE browser, I can see that one character of string is typed in text field and it waits for 1-2 seconds before typing next character. Means for typing one character it's taking 1-2 seconds.

  1. Why is typing so slow with IE?
  2. Is there any alternate way to speed up typing?

My issue was with the driver architecture, and fixed it by downloading and using a 32bit one.

To switch to 32 bit here is what you have to do

  1. Download 32 bit driver service from http://selenium-release.storage.googleapis.com/index.html
  2. Instantiate your InterExplorerWeDriver class using InternetExplorerDriverService class with path to 32 bit driver service.

    InternetExplorerDriver ieDiver = new InternetExplorerDriver(“Path to the 32 bit Explorer driver”);

OR if using a builder:

System.setProperty(“webdriver.ie.driver”,“C:\\drivers\\IEDriverServer.exe”);
DesiredCapabilities ieCapabilities=DesiredCapabilities.internetExplorer();
ieCapabilities.setCapability(InternetExplorerDriver
 .INTRODUCE_FLAKINESS_BY_IGNORING_SECURITY_DOMAINS,true);
ieCapabilities.setCapability("requireWindowFocus", true);
File ie_temp=newFile(“C:\\Selenium\\IEDrivertemp”);
InternetExplorerDriverService.Builder 
ies=newInternetExplorerDriverService.Builder();
ies.withExtractPath(ie_temp);
InternetExplorerDriverService service=ies.build();
WebDriver driver=newInternetExplorerDriver(service,ieCapabilities))

The thread that helped me resolve

http://forumsqa.com/question/typing-too-slow-in-text-fields-while-replaying-tests/


For me it worked with 64bit version of IEDriverServer. I added the property requireWindowFocus with "true" value:

DesiredCapabilities capabilities = DesiredCapabilities.internetExplorer();
capabilities.setCapability(InternetExplorerDriver.INTRODUCE_FLAKINESS_BY_IGNORING_SECURITY_DOMAINS, true);
...
capabilities.setCapability("requireWindowFocus", true);
WebDriver driver = new InternetExplorerDriver(capabilities);

I'm using version 2.47 of Selenium/IE Driver


For 64 bit WebDriver:

  1. Open IE
  2. Go to Internet Options → Advanced → Security
  3. Check ☑ Enable 64-bit processes for Enhanced Protected Mode
  4. Click Apply and OK

For 32 bit WebDriver:

  1. Open IE
  2. Go to Internet Options → Advanced → Security
  3. Uncheck ☐ Enable 64-bit processes for Enhanced Protected Mode
  4. Click Apply and OK

strangely:

  • The setting was necessary no matter if enhanced protected mode was activated or not.
  • Other than the text says in the dialog, restarting my computer was not necessary.

My setup: Windows 10, IE 11, everything 64 bit, Selenium 3.4


This sped it up for me a little bit. IEDriverServer 2.53.1

InternetExplorerOptions options = new InternetExplorerOptions();
options.IntroduceInstabilityByIgnoringProtectedModeSettings = true;
options.RequireWindowFocus = true;
driver = new InternetExplorerDriver(options);

You can change to the 32-bit version, but if 64-bit is required then you can try this solution:

  • Internet Options -> Security -> Check "Enable Protected Mode" for all zones
  • Go to Advanced -> Security -> Check "Enable Enhanced Protected Mode"

This results in no more snail typing on 64-bit IE.