Hi All, I have been using this above module to handle popup in my WATIR 
tests. what I have seen is it works fine when I call a click_no_wait on my 
submit button. When I try to use fire_event method it doesn't works as 
expected and the execution halts till i manually click the OK button. 
Please help
I am adding a section of the code I m using below

:Doesn't work untill I click the OK button on the dialog box manually
---------------------------------------------------------------------------------------------------
$browser.text_field(:id, 'MIR-DV-EFF-DT').set('13-10-2011')
#$browser.text_field(:id, 'MIR-DV-EFF-DT').fire_event("onBlur")
popupMsg = clickprompt("OK","",$browser) 
puts popupMsg

:Works fine and give me a console output "Invalid Date format '13-10-2011' "
---------------------------------------------------------------------------------------------------
$browser.text_field(:id, 'MIR-DV-EFF-DT').set('13-10-2011') 
$browser.button(:id, 'OKButton').click_no_wait
popupMsg = clickprompt("OK","",$browser)  
puts popupMsg

-- 
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

Attachment: HandlePopUp.rb
Description: Binary data

Reply via email to