Selenium WebDriver typing very slow in text field on IE browser

后端 未结 18 2418
感情败类
感情败类 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:42

    Disable NATIVE_EVENT resolved my issue

     DesiredCapabilities capabilities = DesiredCapabilities.internetExplorer();
     capabilities.setCapability(InternetExplorerDriver.NATIVE_EVENTS, false);
     driver = new InternetExplorerDriver(capabilities);
    
    0 讨论(0)
  • 2020-11-27 04:42

    Instead of WebEelement.send.keys, I used Actions object with sendKeys method. This worked like a charm.

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

    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.

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

    I struggled almost a day for finding out. This is because the 64 bit IE Driver sever (IEDriverServer_x64_2.53.1).

    I switched to IEDriverServer_Win32_2.53.1 then it worked, it is superfast now!

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

    Just some remarks that will not solve the issues from the original question, but may help someone with similar problem today:

    For other browsers, their driver version usually depends on browser version, but for IE driver, version depends on the selenium version!

    I want to stress this, because it is important and I did not find it pointed out anywhere in the answers. I also didn't know about this until recently. Today (when creating this post), selenium package from public python repository is on version 3.141.0, but selenium.dev page recommends to download 32-bit IE driver version 3.150.1; these two versions are not fully compatible and so I was experiencing the same issue (however, from different reason).

    Unfortunately, pieces of advice from this thread, namely setting RequireWindowFocus to True, solved the slow typing issue for me. I say unfortunately, because my tests stayed unstable, and, as a bonus, browser window was still in the front of everything and was physically moving the mouse cursor on clicks, making it impossible for me to execute multiple tests in parallel.

    My issue was definitely solved after replacing driver of the newest stable version with the older one matching my selenium package version, and I don't even need to mess with RequireWindowFocus (and all other options I do not want) anymore.

    Keep testing!

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

    The below code helped me with resolving the issue.

    DesiredCapabilities capabilities = DesiredCapabilities.internetExplorer();
    capabilities.setCapability(InternetExplorerDriver.INTRODUCE_FLAKINESS_BY_IGNORING_SECURITY_DOMAINS, true);
    ...
    capabilities.setCapability("requireWindowFocus", true);
    WebDriver driver = new InternetExplorerDriver(capabilities);
    
    0 讨论(0)
提交回复
热议问题