In my first post for this question I show my code. The code below
(part of first post) should allow you to attach to a modal dialog.
With the code below I can access the fields on the modal dialog with
the "iemod" object that gets created. If you look at the first post I
also had a frame to contend with. Just use "iemod" instead of "ie" to
access the fields in the dialog.

50.times do
  begin
    iemod = ie.modal_dialog             # this does find the dialog
    puts "** dialog found **"
    break
  rescue
    puts "** dialog not found **"
    sleep(1)
  end
end


On Sep 21, 1:04 pm, Joe Fleck <joeflec...@gmail.com> wrote:
> Hi George,
>
> Thank for responding.  What do you mean by attach?  Can you give me an
> example?  I am very new with watir though I am a long time HP QTP developer.
>
> Thank you.
> Joe
>
> On Wed, Sep 21, 2011 at 11:44 AM, George Wiley <george.wi...@gmail.com>wrote:
>
>
>
> > Hugh,
>
> > Thanks that explains a lot. I can continue testing in 1.9.2. with that
> > in mind. I will try my code in 1.8.7 to see how it goes.
>
> > Joe,
>
> > You have to attach to the modal if you have not done that already.
> > Also watch out for frames. If there are frames involved you will have
> > to connect to the frame first.
>
> > On Sep 21, 10:49 am, Joe Fleck <joeflec...@gmail.com> wrote:
> > > Hi Hugh,
>
> > > I am using ruby 1.8.7 and watir 2.0 and trying to click a button on a
> > Modal
> > > dialog and nothing is happening.  Being new to watir what do I need to do
> > to
> > > get this to work?
>
> > > Button I am trying to click:
> > > <a id = "accept_terms_of_use"onclick = "remove_submit_button(); jQuery.*"
>
> > > the watir action I am trying to complete:
>
> > > # Clicking the Accept button for term of use
> > > ie.button(:id => 'accept_terms_of_use').click
>
> > > On Wed, Sep 21, 2011 at 10:03 AM, Hugh McGowan <colinsda...@gmail.com
> > >wrote:
>
> > > > Modal dialogs don't work yet in Ruby 1.9.2. The WIN32OLE API changed
> > > > substantially in Ruby 1.9.2 and we rely on a custom compiled version
> > > > of that library to provide access to the modal dialog DOM. This is
> > > > working in Ruby 1.8.7 so if you need modal dialog support you'll need
> > > > to go back (the latest version of Watir will of course work just
> > > > fine). I'm not sure when I'll be able to take a look at this feature
> > > > for 1.9.2 but hopefully in the relatively near future :).
>
> > > > Thanks!
> > > > Hugh
>
> > > > --
> > > > Before posting, please readhttp://watir.com/support. In short: search
> > > > before you ask, be nice.
>
> > > > watir-general@googlegroups.com
> > > >http://groups.google.com/group/watir-general
> > > > watir-general+unsubscr...@googlegroups.com- Hide quoted text -
>
> > > - Show quoted text -
>
> > --
> >  Before posting, please readhttp://watir.com/support. In short: search
> > before you ask, be nice.
>
> > watir-general@googlegroups.com
> >http://groups.google.com/group/watir-general
> > watir-general+unsubscr...@googlegroups.com- Hide quoted text -
>
> - Show quoted text -

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

watir-general@googlegroups.com
http://groups.google.com/group/watir-general
watir-general+unsubscr...@googlegroups.com

Reply via email to