Most recently, I have struggled through automating a heavily AJAX-ey and fairly complex web interface using Selenium.
I have a setup that looks like this:
Visual Studio C# Express
IE Developer Toolbar, for identifying objects on the page
(and now AutoIT)
The occasional use of the Selenium IDE for speed and efficiency's sake.
I was having this particularly stubborn problem with a little dialog that popped up to confirm completion of some action, such as "User profile saved successfully". To this day, I am not 100% certain that I can identify what to call this guy: A pop-up? Alert? Confirmation? IE modal dialog?
Selenium IDE did not record or recognize in any way that this dialog exists. Further, my IE developer toolbar does not recognize this dialog when it's up, either. This all makes identifying it a bit difficult.
In my Selenium script, I tried identifying it as a pop-up, I tried identifying it as an alert, confirmation, and prompt, and none of them worked. My research indicated that this might be an "IE modal dialog" -- which is not supported by Selenium.
Here is what the code that calls this dialog looks like:
The only difference between that and a similar dialog that Selenium correctly handles are those couple of lines that do the redirect ("parent.
Chris McMahon responded to my thread on the agile testing list that he had successfully used AutoIT to "hit it with a hammer". After a little bit of searching online, I found a blog post where someone else had used this tool -- in this case, the poster created an executable that looked for windows with certain visible text, and just closes them. This script runs separately from the Selenium test, just constantly polling the windows. It's an ugly hack, but when I tried it, it worked and allowed my Selenium tests to run.
To give proper credit, here is a link to the blog that posted this particular solution: