Clever code. My problem is slightly
different. I am testing a product that uses a web based GUI, by navigating to
all GUI controls and collecting data for validation comparisons. This product
generates the _javascript_ alert windows to kindly prompt the user that some
action has been completed. They lock up the screen until something clicks the
OK button on the _javascript_ alert window. I want to code the OK button click
for this window, which was opened by the product. From:
[EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Adam Reed David, I remember this being
in the FAQ and forum posts, but I haven't been in a while -- maybe it was
removed (I can't check at the moment). First you define your script that
closes the window (I called it jsAlert). def jsAlert(button, waitTime = 3) Then, before the button you want to click
that generates the popup, add in: jsAlert("OK", 3) ie.button(:name,
"woohoo").click # This
is the button you want to click that generates the popup Thanks, Adam Reed RelocationCentral by CORT From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On
Behalf Of Does Watir have a way of processing _javascript_ Alert
windows, by clicking the OK button to dismiss the window? The code that invokes
the window issues an alert call with no window handle. I did not find anything
on this in the online docs or in the email dist. |
_______________________________________________ Wtr-general mailing list Wtr-general@rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general