Hi,
I have a solution for something I am trying, but its very much belt
and braces. I was wondering if anyone else has a more elegant
solution.
Basically I need to perform an action at a (fairly) accurate point in
time after a preceding event. However, between these 2 events I need
to carry out some additional checks which will not be consistent in
timing, so I cannot just add sleeps.
This is a fairly complex system involving 2 different websites with
another application interfacing between the 2, but basically what I am
doing is below:
t=Time.now.to_i
t=t+300
Do something
Check results
while (Time.now.to_i)-t !=0
end
Do something else
Check results
The while/end loops until 300s has passed from the start of the test,
but I feel this is not the best way to do this.
Thanks,
Trevor
--
Before posting, please read http://watir.com/support. In short: search before
you ask, be nice.
[email protected]
http://groups.google.com/group/watir-general
[email protected]