Hi Chuck,

I tried your soultion on stackoverflow and it seems to work to handle
confirm popup, however it comes with an error 'NoMethodError:
undefined method `javascript_dialog' for #<Watir::Browser:
0x00000002e90c08>' at the end.

Any thoughts pls?

Thanks,
Karthik

On Nov 30, 9:41 pm, Chuck van der Linden <[email protected]> wrote:
> On Nov 30, 9:08 am, Gene Korsunsky <[email protected]> wrote:
>
> > Hello, I am trying to execute the Javascript inside the frame. (Watir/Ruby
> > env)
> > My code look like this:
> > browser.frame(:id, frame_id).execute_script “window.confirm = function() {
> > return true; }”
> > browser.frame(:id, frame_id).button(:id, “btnDelete”).click
>
> > Similar code works fine on the pages without frames. Is there a way to
> > dismiss JavaScript dialog on pages with frames?
>
> Watir or Watir-webdriver
>
> Are you sure it's a Confirm window and not an Alert or Prompt?
>
> You may want to review what I wrote in this StackOverflow answer and
> see if it helps you.  http://stackoverflow.com/a/8172888/409820

-- 
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]

Reply via email to