[Wtr-general] Concurrent tests, different regions...
Bret Pettichord
bret at pettichord.com
Mon Jun 11 19:13:13 EDT 2007
eisdrache wrote:
> 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
Using this code with multiple threads will eventually fail
unpredictably. You need to pass in the ie object as a parameter to avoid
this.
Bret
More information about the Wtr-general
mailing list