Ok... fat fingers so I continue
Consider this:
It will popup and OK msgbox
require 'dl'
def method_messagebox(txt,title,buttons)
puts ' * method_messagebox'
user32 = DL.dlopen('user32')
msgbox = user32[ 'MessageBoxA', 'ILLSI' ]
r, rs = msgbox.call(0,txt,title,buttons)
return r
end
# Main script stuff here
# Now wait tile the user answers the prompt by clicking OK
response = method_messagebox('Script is waiting for user to click OK',
'Manual Interrupt', 0)
..... your other watir code ....
Details at this link:
http://rubyonwindows.blogspot.com/2007/06/displaying-messagebox-using-windows-api.html
On Aug 30, 11:54 am, byung <[email protected]> wrote:
> Is there a way to make Watir code to wait for user's click event??
>
> I would like to run the Watir code.. and while it is running, wait
> till the user click a link on the web page..
>
> If the user click a link on the page, and then the code go to next
> step...
>
> How would it be possible to do this??
>
> Wait, User Click the link, go to next step in the Watir code.. Wait,
> User Click the link, and then go to next step..
>
> any help will be deeply appreciated.
--
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]