Class: WinClicker
- Inherits:
-
Object
- Object
- WinClicker
- Defined in:
- lib/firewatir/winClicker.rb
Overview
Linux/X11 implementation of WinClicker. Not all functionality is present because of the differences between X11
and Win32.
Instance Method Summary collapse
- #clearSecurityAlertBox ⇒ Object
- #clickJavaScriptDialog(button = "OK") ⇒ Object
- #clickJSDialog_Thread(button = "OK") ⇒ Object
- #clickWindowsButton(title, button, maxWaitTime = 30) ⇒ Object
Instance Method Details
#clearSecurityAlertBox ⇒ Object
24 25 26 27 |
# File 'lib/firewatir/winClicker.rb', line 24 def clearSecurityAlertBox (/Unknown Authority/, "OK") (/Domain Name Mismatch/, "Cancel") end |
#clickJavaScriptDialog(button = "OK") ⇒ Object
9 10 11 |
# File 'lib/firewatir/winClicker.rb', line 9 def clickJavaScriptDialog(="OK") (/The page/,) end |
#clickJSDialog_Thread(button = "OK") ⇒ Object
13 14 15 16 17 18 19 20 21 22 |
# File 'lib/firewatir/winClicker.rb', line 13 def clickJSDialog_Thread(="OK") puts "clickJSDialog_Thread Starting waiting..." sleep 3 puts " clickJSDialog_Thread ... resuming" n = 0 while n < 3 sleep 1 (/The page/,) end end |
#clickWindowsButton(title, button, maxWaitTime = 30) ⇒ Object
29 30 31 32 33 34 35 36 37 38 39 40 41 |
# File 'lib/firewatir/winClicker.rb', line 29 def clickWindowsButton(title, , 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 (w,) end |