@ie.modal_dialog.title() gives me the correct title of the modal
dialog box when I run it from IRB
I am using IE7

David

On Nov 2, 2:16 pm, Bret Pettichord <b...@pettichord.com> wrote:
> I did a little research on this issue. There does appear to be a bug
> using this code with IE8 -- the title changed from "Web Page Dialog" to
> "Webpage Dialog" and the Watir code has not been updated to handle this.
> However, rereading your original post makes me think you are using IE7.
> Can you confirm this?
>
> You said that
>
> @ie.modal_dialog.title()
>
> works. What does it say the title is?
>
> Bret
>
>
>
> david wrote:
> > I run some preliminary commands in irb and pop up the modal dialog
> > successfully; but when I try and exercise the dialog it won't work.
>
> > irb(main):009:0> @modal = @ie.modal_dialog(:title, 'Batch Update')
> > Watir::Exception::NoMatchingWindowFoundException: Modal Dialog with
> > title Batch
> > Update not found. Timeout = 2.0
> >         from C:/Work/ruby/lib/ruby/gems/1.8/gems/watir-1.6.2/lib/
> > watir/modal_dialog.rb:51:in `locate'
> >         from C:/Work/ruby/lib/ruby/gems/1.8/gems/watir-1.6.2/lib/
> > watir/modal_dialog.rb:86:in `initialize'
> >         from C:/Work/ruby/lib/ruby/gems/1.8/gems/watir-1.6.2/lib/
> > watir/
> > container.rb:186:in `new'
> >         from C:/Work/ruby/lib/ruby/gems/1.8/gems/watir-1.6.2/lib/
> > watir/container
> > .rb:186:in `modal_dialog'
> >         from (irb):9
>
> > What also puzzles me is why I get an error as follows
> > irb(main):011:0> @modal = @ie.modal_dialog(:title, /Batch/)
> > ArgumentError: Title value must be String
>
> > when I had no issue attaching to the IE instance using same syntax
> > irb(main):002:0> @ie = Watir::IE.attach(:title, /Mainet/)
>
> > And lastly when I execute
>
> > @ie.modal_dialog.title()
>
> > that works!
>
> > David
>
> > On Oct 30, 8:50 am, Bret Pettichord <b...@pettichord.com> wrote:
>
> >> Could you try
>
> >> @ie.modal_dialog(:title, 'Batch Update')
>
> >> david wrote:
>
> >>> Have a section of code that is waiting for a modal dialog to appear
> >>> which is visible with the title ‘'Batch Update -- Web Page Dialog’
>
> >>> modal = @ie.modal_dialog(:title, 'Batch Update -- Web Page Dialog')
> >>> modal.wait
> >>> modal.button(:value,'Yes').click_no_wait
>
> >>> However the dialog is not being found by title.
>
> >>> Is there a problem with findingmodal_dialogby title? Is there
> >>> another way to do this? I am using Ruby 1.8.6
>
> >>> I tried just modal = @ie.modal_dialog
> >>> which should work according to the API documentation but I see there
> >>> is a problem with this approach, even though there can be only one
> >>> modal dialog at a time on screen and this seems like an ideal way to
> >>> attach to a modal dialog. I get the following error:
>
> >>> IE#modal_dialognot supported with the current version of Ruby
> >>> (1.8.6).
> >>> Seehttp://jira.openqa.org/browse/WTR-2fordetails.
> >>> undefined method `connect_unknown' for WIN32OLE:Class
>
> >>> David
>
> >> --
> >> Bret Pettichord
> >> Lead Developer, Watir,www.watir.com
> >> Blog,www.io.com/~wazmo/blog
> >> Twitter,www.twitter.com/bpettichord
>
> --
> Bret Pettichord
> Lead Developer, Watir,www.watir.com
> Blog,www.io.com/~wazmo/blog
> Twitter,www.twitter.com/bpettichord
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Watir General" group.
To post to this group, send email to watir-general@googlegroups.com
Before posting, please read the following guidelines: 
http://wiki.openqa.org/display/WTR/Support
To unsubscribe from this group, send email to 
watir-general-unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/watir-general
-~----------~----~----~----~------~----~------~--~---

Reply via email to