This sample illustrates how you can control JavaScript Timeouts, Intervals, and Meta refreshes
When you click the 'Start' button, a string 'This is sample' starts sliding within a text field.
This is done by using JavaScript setInterval() call with interval value equal to 20 milliseconds.
If you click the 'Start' button in your Java test-case actiWATE won't execute any scripts pending
on intervals or timeouts. To test such timers actiWATE provides a method AsyncEvents.executeByTimeOffset(long) to emulate
time flow. This way you can call AsyncEvents.executeByTimeOffset(20) and then verify that the string moved to the rigth by one space.
Same for JavaScript setInterval() calls - you can verify page's state after the timeout is elapsed by emulating
this timeout with AsyncEvents.executeByTimeOffset() method.
Meta refreshes are supported in the same way too.
If your page contains zero intervals, timeouts, or meta refreshes, you are still able to use AsyncEvents.executeByTimeOffset(0) call
to force single execution of such timer.
Working with Timeouts, Intervals, and Meta refreshes
To start runing text click 'Start' button and watch status bar.
To stop running text click 'Stop' button.