Painful Selenium Testing – Part 5 – IE


IE testing on Selenium IDE is a real nightmare.

In short, after struggled for a long time, I still failed to work it out.

Here is what we attempted to do:

  1. Record the test suites using Selenium IDE of Firefox

  2. Use Selenium Server to run the suites on IE

And Here is what we got:

  1. There are two modes for IE execution using Selenium Server.

    • iehta (default mode of Selenium Server IE now), and
    • iexploreproxy (default mode of Selenium Server IE previously)
  2. Both modes are not officially supported. If you got any problem with IE, which is very like to happen, the developers would only tell you to use selenium WebDriver instead.

  3. Some of the testing suite that you recorded using selenium IDE of Firefox would be executed well. Yet unlikely you could get all of them working.

  4. The event model in IE is very odd, it seems you would get two distinct DOM trees for the runner and robots.

    For example, I have tried to embed the jQuery library inside user-extensions.js, however I could not use the jQuery to access the object events of page in IE (it works in Firefox however). But if I try to access the jQuery library inside the page (assumes the web page also uses jQuery), then I could access the object events using that jQuery object.

  5. Screen capture in IE (for selenium error) is a total nightmare. It's easy in Firefox, because the Firefox plugin system allows you do screen capture and save to file easily. However, in IE, you are going to need Active-X.

    There was a plugin called SnapsIE, but it only works for iexploreproxy mode, which is not supported by latest Selenium Server. I tried to make a work-around by modifying the source code, so that it would do full-screen capture instead of browser region capture, but the performance is really bad. In fact the machine occasionally hangs after this active-x plugin is activated.

So conclusion is:

If you need some light tests on IE, then you could try the 'iehta' mode. But you want to set up some serious tests on IE, you better switch to selenium WebDriver.

Leave a comment

Leave a Reply

Your email address will not be published.