Hi all,

I'm using watir-webdriver with firefox and Ruby 2.0.0. I'm trying to use 
browser.goto() to redirect away from a (facebook) page with unsubmitted 
text. An "are you sure you want to navigate away from this page?" alert 
pops up, which causes an UnhandledAlertError to be thrown. I tried handling 
the error with code along these lines:

begin 
    browser.goto "https://www.facebook.com"; 
rescue UnhandledAlertError 
    browser.alert.ok 
end

But this does not work because for some reason, the alert is being closed 
before my rescue code can handle it. Any idea what might be causing it?

-- 
-- 
Before posting, please read http://watir.com/support. In short: search before 
you ask, be nice.

[email protected]
http://groups.google.com/group/watir-general
[email protected]

--- 
You received this message because you are subscribed to the Google Groups 
"Watir General" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to