Selenium WebDriver typing very slow in text field on IE browser

后端 未结 18 2424
感情败类
感情败类 2020-11-27 04:03

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.s         


        
相关标签:
18条回答
  • 2020-11-27 04:35

    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);
    
    0 讨论(0)
  • 2020-11-27 04:35

    I also had the same issue way back. You can try out by

    Internet Options -> Connections -> LAN Settings -> Untick Automatically detect settings.

    Hope this helps.

    0 讨论(0)
  • 2020-11-27 04:35

    This probably is an issue with the machine you are running the test on. If you experience general lag with the computer, then this will happen.

    Is there an alternate way to speed up typing?

    Sure, you can create a custom method to clear the text, then use JavaScript to fill the field. (mind you that doing this, might not be able to work with things like "typeahead" and "suggestions as you type")

    0 讨论(0)
  • 2020-11-27 04:38

    For tests running on IE11 64bit, setting the NATIVE_EVENTS capability to false worked for me. Without it, using the 64bit driver server 3.0 was extremely slow as reported. The 32bit 3.0 driver server swallowed some of the chars it was supposed to send (e.g. "FluentLenium" became "FlntLnum").

    The following resolved both problems.

    DesiredCapabilities capabilities = DesiredCapabilities.internetExplorer();
    capabilities.setCapability(InternetExplorerDriver.NATIVE_EVENTS, false);
    WebDriver driver = new InternetExplorerDriver(capabilities);
    

    I am not sure whether this has additional side effects.

    0 讨论(0)
  • 2020-11-27 04:39

    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

    0 讨论(0)
  • 2020-11-27 04:40

    I also faced the same issue with IE11 on Windows x64 bit. I was using 64bit version of IEDriverServer.exe (IE driver-3.7.0 with selenium-3.7.0).

    After I changed to 32bit version of IEDriverServer.exe, it solved the issue

    0 讨论(0)
提交回复
热议问题