Note: Published an update here.

I have been looking out for some good open open source automated functional testing tools. After some bit of research and based on some recommendations I went on to try Watij and Selenium.

Watij:
Based on popular ruby based Watir, I was quite impressed by its API. It has got good little documentation on its site and on wiki, just enough for you get started and do some reasonable testing. You can write the tests using the popular JUnit framework, which is a big plus.

It all worked fine, in fact, I could automate quite a few screens in an application until I hit a roadblock :( Whenever it encounters modal dialog windows it just stops working. Some how it seems not recognize them, and waits for the screen to load even though it has already been loaded.

Wondering how other people working with Watij working around this limitation. It has been a while since they made a release after 3.1.0. I hope the support for modal dialog windows would be functional in the next release.

Selenium:
After that experience with Watij, I started looking at Selenium. For some reason, I did not have that much luck, not even as much compared with Watij.

After starting up the Selenium server and try to hit a web page I've received a 404 error on page. Based on the documentation on the site, I have started using *iehta instead of *iexplore and the 404 went away. The joy was short lived as I started getting windows dialog messages saying a "script is trying to run, do you want run it?" (not the exact verbage). I had to keep clicking Yes on it to move forward.

However, with bit more researching I found a way to resolve that. This time started the server in the mutiwindow mode (with -multiWindow option) the application started running on a different window than that of the Selenium browser.

That is as far as I can go with this at this point. As I start with a page on the application I see dozens of browser windows started popping for the same page. Each of this page shows up a confirmation popup saying that the web site you're on is trying to close the window, do you want to close the window? Not sure why Selenium wants to close the browser as soon as it opens this very first page! This was working some time ago when I was on IE 6, now that I'm on IE 7 I find this issue.

Conclusion:
All in all, I found more success with Watij than Selenium (on IE 7). I'm sure there are many people out there using both these APIs. I see there are many open source projects using Selenium. I'd be interested in knowing what they think about these two APIs. Which one they liked better and why? Are they ready for prime usage?

Be Sociable, Share!