When you get back to it try using this (you will need to use the newest
gem if Watir):

 
   require 'watir\contrib\enabled_popup'
 
   def startClicker( button , waitTime=9, user_input=nil)
     hwnd = $ie.enabled_popup(waitTime)  # get a handle if one exists 
     if (hwnd)  # yes there is a popup
       w = WinClicker.new
       if ( user_input )
         w.setTextValueForFileNameField(hwnd, "#{user_input}")
       end
       sleep 3  # I put this in to see the text being input it is not
necessary to work
       w.clickWindowsButton_hwnd(hwnd, "#{button}")  # "OK" or whatever
the name on the button is
       w=nil    # this is just cleanup
     end
   end
 
   $ie=Watir::IE.start("c:\test.htm")
 
 
   $ie.image(:id,'3').click_no_wait
   startClicker("OK", 7, "User Input") # 3rd parameter is optional.

 

Hope this helps

 

--Mark

 

________________________________

From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Matt Makins
Sent: Monday, December 11, 2006 8:51 AM
To: [email protected]
Subject: Re: [Wtr-general] pop up box

 

Thanks, it's on hold at the moment.  I used the winclicker
clickJSDialogue method and ran it has a separate process, however it
didn't seem to find the window.

I'll have to give it some more time.

 

Cheers,

Matt

________________________________

From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Cain, Mark
Sent: 11 December 2006 16:25
To: [email protected]
Subject: Re: [Wtr-general] pop up box

 

Did you get this solved?

 

--Mark

 

________________________________

From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Matt Makins
Sent: Thursday, December 07, 2006 4:24 AM
To: [email protected]
Subject: [Wtr-general] pop up box

 

 

Hi,

 

I have a pop up box that appears on a web page, just a IE window with a
'OK' button.

How do I access the pop up box and click the 'OK' button.

 

I have tried WinClicker.

 

Thanks,

Matt

 

_______________________________________________
Wtr-general mailing list
[email protected]
http://rubyforge.org/mailman/listinfo/wtr-general

Reply via email to