Bret Pettichord wrote:
>Kreutzer, Christian wrote:
>
>
>>goto LoginPage do
>> username.set user
>> password.set pwd
>> login.click
>> on PleaseChangeYourPassword do
>> old_password.set pwd
>> new_password.set new_pwd
>> ok.click
>> end
>>end
>>
>>Is it possible to implement such a kind of a eventhandling with ruby and
>>watir or do you guys have a better idea for handling such a kind of problem?
>>
>>
>>
>This is definitely possible and not a bad idea.
>
>Bret
>_______________________________________________
>Wtr-general mailing list
>[email protected]
>http://rubyforge.org/mailman/listinfo/wtr-general
>
>
Also, you might find it easier to put the event handing in a block for click
So
goto LoginPage do
username.set user
password.set pwd
login.click( :yield_on => PleaseChangeYourPassword ) do
old_password.set pwd
new_password.set new_pwd
ok.click
end
end
So that the code for the modal piece is handled inside click ... but,
that's just how i'd do things ;) YMMV.
jd
_______________________________________________
Wtr-general mailing list
[email protected]
http://rubyforge.org/mailman/listinfo/wtr-general