HsacAcceptanceTests.SlimTests.BrowserTest.RepeatUntilTests.ClickUntilTest


This test ensures that we can keep clicking until a condition is met.

We use a mock server running to serve the HTML defined in this page.


variable defined: HTML= {{{ <html> <body> <a href="FitNesseMock/2.html">link</a> <label for="field">Counter</label> <input id="field" value="1"> </body> </html>}}}


variable defined: HTML2= {{{ <html> <body> <a href="FitNesseMock/3.html">link</a> <label for="field">Counter</label> <input id="field" value="2"> </body> </html>}}}

variable defined: HTML3= {{{ <html> <body> <a href="FitNesseMock/4.html">link</a> <label for="field">Counter</label> <input id="field" value="a3@example.com"> </body> </html>}}}


variable defined: HTML4= {{{ <html> <body> <a href="FitNesseMock/5.html">link</a> <label for="field">Counter</label> <input id="field" value="4"> </body> </html>}}}

variable defined: HTML5= {{{ <html> <body> <a href="FitNesseMock/6.html">link</a> <label for="field">Counter</label> <input id="field" value="5"> </body> </html>}}}


script mock xml server setup
add response
<html>
<body>
<a href="FitNesseMock/2.html">link</a>
<label for="field">Counter</label>
<input id="field" value="1">
</body>
</html>
add response
<html>
<body>
<a href="FitNesseMock/3.html">link</a>
<label for="field">Counter</label>
<input id="field" value="2">
</body>
</html>
add response
<html>
<body>
<a href="FitNesseMock/4.html">link</a>
<label for="field">Counter</label>
<input id="field" value="a3@example.com">
</body>
</html>
add response
<html>
<body>
<a href="FitNesseMock/5.html">link</a>
<label for="field">Counter</label>
<input id="field" value="4">
</body>
</html>
add response
<html>
<body>
<a href="FitNesseMock/6.html">link</a>
<label for="field">Counter</label>
<input id="field" value="5">
</body>
</html>
$url<-[http://127.0.0.1:8000/FitNesseMock] get mock server url

script browser test
open $url->[http://127.0.0.1:8000/FitNesseMock]
set repeat interval to 1100 milliseconds
repeat at most 10 times
click link until value of Counter is a3@example.com
check repeat count 2
check time spent repeating 2745<10000

script mock xml server setup
stop