WebDriver Clicking button issue in IE 11



  • Have a suite of web-drivers tests that run in chrome and IE 10, but will not run in IE 11.

    The tests fail in IE-11 when clicking a button as the following action (a form popup) does not occur. I cannot repeat this manually and this only seems to happen in IE-11. No exceptions are thrown when finding the button or clicking the button. This is an intermittent error as sometimes the clicking will work and the tests will run.

    I can put an explicit wait before the click(s) occur and tests will then run.

    The button is always present in the DOM (not added later by javascript).

    I have also added a check so that web-driver will not start interacting (clicking) with a page until after all the initial javascript has finished running on the page. This is done by the last piece of javascript setting a flag.

    Has anyone had similar issues?

    Edit I don't want to have waits in the test code. Just put them in to debug what was not working



  • Check this code. It works properly in IE. All you need to set some capabilities.

    DesiredCapabilities ieCapabilities = DesiredCapabilities.internetExplorer();
    
    ieCapabilities.setCapability("nativeEvents", false);    
    ieCapabilities.setCapability("unexpectedAlertBehaviour", "accept");
    ieCapabilities.setCapability("ignoreProtectedModeSettings", true);
    ieCapabilities.setCapability("disable-popup-blocking", true);
    ieCapabilities.setCapability("enablePersistentHover", true);
    
    driver = new InternetExplorerDriver(ieCapabilities);
    


Suggested Topics

  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2