Hi folks, i have an error in my scripts that unable to find the solution, hope someone can help. Please refer below for my case:
I have a JS popup that i should click on 'OK' but when i put click_no_wait before the check_for_popups() got called, it gives me this error >> `method_missing': undefined method `click_no_wait' for >> #<Watir::Anchor:0x3b0c718> (NoMethodError) Below is where the error occurs. However, if i just use click event then the popup just stall until timeout happens browser.frame(:name, 'iframe_canvas').link(:text, 'Leave League').click_no_wait check_for_popups('Window Internet Explore','OK') def check_for_popups(title='Window Internet Explorer', button) popup=Thread.new { autoit = WIN32OLE.new('AutoItX3.Control') ret = autoit.WinWait(title,"",60) if (ret==1) puts "There is popup." autoit.WinActivate(title) button.downcase! if button.eql?('ok') || button.eql?('yes') || button.eql? ('continue') autoit.Send("{Enter}") else autoit.Send("{tab}") autoit.Send("{Enter}") end else puts "No popup" end } at_exit { Thread.kill(popup) } end Appreciate if some one can offer some help -- 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