More than an year ago I published my experiences with Selenium and Watij. At that time I was actually not sure whether Selenium and Watij were ready for prime usage, especially for testing on IE7 (a requirement for my app). So fast forward to now, I'm lot more satisfied with what I'm seeing ..
Both the tools have got more recent versions out compared to what I used earlier. Started to work on Selenium RC. I was glad a lot of stuff that was a bit shaky in my earlier experience is more polished now. Just when I was thinking that I'm proceeding quite well with Selenium RC, hit with an issue where Selenium loses handle to the main window if the (child) popup window posts data and the main window refreshes based on that post. Logged a critical issue at Selenium's Jira, still awaiting for some action on that (I wish I had some time to look into that and provide a patch, if required).
After that, started to look for alternatives -- having used Watij earlier, prompted me to give it another try. I was pleasantly surprised by the ease at which I could proceed this time, including the issues that I was having earlier with modal dialogs. Here are some of the comparisons:
- Watij's API is more Object-oriented than that of Selenium's, which is perhaps more functional in nature.
- While using Selenium I had to use waitForXXX calls to wait till the page gets loaded, or for the popup to get loaded, etc. But with Watij the tool is "smart" enough to figure when the page load completed so as to proceed with the subsequent calls. Having said that there are still some areas where some sort of wait is required, but I believe that is based on the application functionality that is under test.
- A drawback for Watij is it works only for IE. That works fine for me as that is our primary requirement. If you have to test under different browsers than Selenium is perhaps the way to go.
- With Selenium IDE, the tests can be recorded using a Firefox plugin. There is no such recording capability with Watij.
- Watij doesn't have a Selenese type of "language" to write the test cases outside of using a programming language (like Java). Needless to say that this kind of notation would be useful for non-technical people. Having said that it is not that difficult to write your own version of Selenese kind of notation.
With all those observations, Watij was what I chose to proceed with. Combination of the robustness of Watij and the critical issue that I was hit with while using Selenium (described above) made me to move in the direction of Watij.