Goralight
Goralight

Reputation: 2107

Robot Framework - Selenium2Library - IE11 is very unstable to complete tests

Basically, if the test cases are ran on Chrome, FF or Edge, they go through without a problem - and you can even use the browser after the tests.

With IE however, running it from a web driver basically makes the browser unstable. This is for both the framework and manual usage. The issue I am having is that some elements flicker when they have been selected. And unfortunately, I am trying to select an element deep inside a drop down table. Once it starts to flicker, and then executes the Click Element, it clicks behind the drop down, and thus accidentally clicking on a completely different element and stopping my tests.

Is there a way round this? I need to automate our tests on all 4 of the browsers.

Upvotes: 3

Views: 1811

Answers (4)

Vaish
Vaish

Reputation: 37

So I had the same/similar issue when I tried to automate my tests using Robot in IE11. In my case, once the elements start flickering the test doesn't even proceed further. The browser just hangs without any interaction. The workaround I found was, to use "Press Key" keyword instead of "Click Element" and given an enter key. This worked fine for me and I was able to complete my tests. Ofcourse I had to add two two test cases one for IE and one for other browsers but it did work!!

Below is the example test case:

Click Add - IE                
    # Click Element    ${I_Add}    --> This is for the other browsers
    Focus    ${I_Add}              -->
    Press Key    ${I_Add}    \\13  --> These are for IE

If you have any further clarifications please do ask me

Upvotes: 2

Hemant Kulkarni
Hemant Kulkarni

Reputation: 193

It may or may not work for you; but still take a look at -

  1. Add your application URL as trusted site.
  2. Make sure "Enable Protected Mode" is either ON or OFF for all 4 zones (Internet, Local Intranet, Trusted Sites & Restricted sites.
  3. Turn Off pop up blocker.
  4. Turn off SmartScreen filter.

Upvotes: 0

JimEvans
JimEvans

Reputation: 27496

Did you try using the requireWindowFocus capability for use with IE? There are perfectly valid technical reasons for why the driver behaves as it does. I would encourage anyone interested in why to read a blog post dedicated to discussing the issue.

Upvotes: 1

Moshisho
Moshisho

Reputation: 2981

IMHO, InternetExplorerDriver isn't stable enough and isn't worth the ROI for automated tests, especially in your case where 3 major browsers work with your code, and IE will require ugly patches that can harm the rest of the tests. To quote from InternetExplorerDriver:

Cons

  • Obviously the InternetExplorerDriver will only work on Windows!
  • Comparatively slow (My addition - See Dave Haeffner's great benchmark)

Special Configurations:

On IE 7 or higher on Windows Vista or Windows 7, you must set the Protected Mode settings for each zone to be the same value. ...Additionally, "Enhanced Protected Mode" must be disabled for IE 10 and higher ... For IE 11 only, you will need to set a registry entry...

How Javascript Events are implemented:

As the InternetExplorerDriver is Windows-only, it attempts to use so-called "native", or OS-level events to perform mouse and keyboard operations in the browser. This is in contrast to using simulated JavaScript events for the same operations. ... However, there are currently some issues with mouse events when the IE browser window does not have focus, and when attempting to hover over elements.

And the list goes on...

Upvotes: 1

Related Questions