Hi all,
Now i am able to click on the alert popup with watir, i followed the code
form the FAQ's but later i copied the whole code into another machine, i am
able to run all the test cases except the alert popup, that is not working in
another machine, so wat mightbe the problem?? Its giving an error "timed out"
This is my code,
require 'watir\contrib\enabled_popup'
#
def startClicker( button , waitTime= 9, user_input=nil )
# get a handle if one exists
hwnd = $ie.enabled_popup(waitTime)
if (hwnd) # yes there is a popup
w = WinClicker.new
if ( user_input )
w.setTextValueForFileNameField( hwnd, "#{user_input}" )
end
# I put this in to see the text being input it is not necessary to work
sleep 3
# "OK" or whatever the name on the button is
w.clickWindowsButton_hwnd( hwnd, "#{button}" )
#
# this is just cleanup
w=nil
end
end
#
# MAIN APPLICATION CODE
#
$ie = Watir::IE.start( "c:\test.htm" )
# This is whatever object that uses the click method.
# You MUST use the click_no_wait method.
$ie.image( :id, '3' ).click_no_wait
#
# 3rd parameter is optional and is used for input and file dialog boxes.
startClicker( @button, 7 , "User Input" )
Thanks in Advance,
Harish
_______________________________________________
Wtr-general mailing list
[email protected]
http://rubyforge.org/mailman/listinfo/wtr-general