Reliable web application GUI testing Reliable web application GUI testing selenium selenium

Reliable web application GUI testing


Unfortunately, UI testing is not very reliable in general. Having to use XPath, because IDs aren't set on elements on the page. Having to use frames (I hate frames and glad its being deprecated in HTML5).

It's the nature of the beast unfortunately and a major issue I find with Selenium, which is my prefered UI testing tool for browsers, is that people start on the Selenium IDE which tries to record everything you do, but it can only do so much making tests unreliable.

Record/Replay tools should be called Record/Tweak/Replay, so that it can handle tests correctly.

Writing your tests for Selenium RC or WebDriver (these are currently being merged to create Selenium 2) allows you to handle the issues that you may see in Selenium IDE. It makes you write tests using programming languages like Java, Python, C# and many more. Since you can add conditionals to your tests.

The way that I have got less technical people to use Selenium is to create a DSL for them to use, so that it is a more natural language when writing tests.


Have a look at Sahi.

  1. It does not need to wait for Ajax or page loads.

  2. It does not use XPaths, using DOM relations (_near, _in) instead.

  3. It traverses frames/iframes automatically

  4. The recorder works for frames, iframes, and popup windows

  5. It handles auto generated IDs well

  6. The recorder and playback works on almost all browsers and operating systems.

  7. It does not use special privileges to run tests.

Over the last year, Sahi has had seven public releases and the support is prompt on the forums.

Disclaimer: I am the author of Sahi.


Instead of using selenium.waitForPageToLoad("30000"); use like this

selenium.waitForPageToLoad(Timeout);

and don't forget to set the timeout using settimeout option

selenium.setTimeout(Timeout);

I too faced the same issues with the timeout. After setting the timeout, things worked well.