[Wtr-general] Concurrent tests, different regions...

eisdrache forum-watir-users at openqa.org
Mon Jun 11 01:44:10 EDT 2007


I understand what you are saying about the global variables, but in this case they are a necessary evil as I am using the following code in order to handle javascript pop-ups:

def startClicker( button , waitTime= 9, user_input=nil )
 hwnd = $ie.enabled_popup(waitTime)  
 if (hwnd) 
  w = WinClicker.new
  if ( user_input ) 
   w.setTextValueForFileNameField( hwnd, "#{user_input}" )
  end
  sleep 3         
  w.clickWindowsButton_hwnd( hwnd, "#{button}" )
  w=nil    
 end
end


More information about the Wtr-general mailing list