Linux/X11 implementation of WinClicker. Not all functionality is present because of the differences between X11
and Win32.
# File lib/firewatir/winClicker.rb, line 24 def clearSecurityAlertBox click_window_button(/Unknown Authority/, "OK") click_window_button(/Domain Name Mismatch/, "Cancel") end
# File lib/firewatir/winClicker.rb, line 13 def clickJSDialog_Thread(button="OK") puts "clickJSDialog_Thread Starting waiting..." sleep 3 puts " clickJSDialog_Thread ... resuming" n = 0 while n < 3 sleep 1 click_window_button(/The page/,button) end end
# File lib/firewatir/winClicker.rb, line 9 def clickJavaScriptDialog(button="OK") click_window_button(/The page/,button) end
# File lib/firewatir/winClicker.rb, line 29 def clickWindowsButton(title, button, maxWaitTime=30) start = Time.now w = window_by_title(title) until w || (Time.now - start > maxWaitTime) sleep(2) # Window search is pretty CPU intensive, so relax the requirement w = window_by_title(title) end unless w puts "clickWindowsButton: Cant make window active in specified time ( " + maxWaitTime.to_s + ") - no handle" return false end click_button(w,button) end