At 02:30 AM 7/23/2005, Kurt Sussman wrote:
I'm trying to write a script that tests a relatively simple web app.
There are two factors that make this difficult: the page I need to test
is created by a javascript function (indirectly via a link), and the
developers are unwilling to make any changes to that code to increase
testability.

My first thought was to sleep for a while, waiting for the javascript
function to run and load the new window, then find it by name. This
isn't working for me and I can't figure out why.

Any ideas?

If the archives were searchable, I'd search them before asking... I hope
this isn't a common question. I did browse the archives, but that's not
the same as searching.

Thanks.

This is the biggest weakness with Watir: modal javascript popups. None of us have figured out a way to get to the popups DOM, and from what i've been able to tell, this actually stems from a weakness in the DOM specification, rather than a fault in the Microsoft implementation. I did find a MS technical note that indicated a workaround, but it would have to be coded in C and would require an optional Accessibility feature -- i'm not sure whether it is worth pursuing. (I'm offline at the moment, google for ihtmldocument2 and its the third or fourth link.)

In the mean time, the best we've been able to to do is to send key events to the popup window to get it to go away. This "solution" is in the FAQ.

Bret


_____________________
 Bret Pettichord
 www.pettichord.com

_______________________________________________
Wtr-general mailing list
[email protected]
http://rubyforge.org/mailman/listinfo/wtr-general

Reply via email to