HsacAcceptanceTests.SlimTests.BrowserTest.RepeatUntilTests.RefreshUntilTest


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

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


variable defined: HTML= {{{ <html> <body> <label for="field">Counter</label> <input id="field" value="1"> </body> </html>}}}


variable defined: HTML2= {{{ <html> <body> <label for="field">Counter</label> <input id="field" value="2"> </body> </html>}}}

variable defined: HTML3= {{{ <html> <body> <label for="field">Counter</label> <input id="field" value="3"> </body> </html>}}}


variable defined: HTML4= {{{ <html> <body> <label for="field">Counter</label> <input id="field" value="4"> </body> </html>}}}

variable defined: HTML5= {{{ <html> <body> <label for="field">Counter</label> <input id="field" value="5"> </body> </html>}}}


script mock xml server setup
add response
<html>
<body>
<label for="field">Counter</label>
<input id="field" value="1">
</body>
</html>
add response
<html>
<body>
<label for="field">Counter</label>
<input id="field" value="2">
</body>
</html>
add response
<html>
<body>
<label for="field">Counter</label>
<input id="field" value="3">
</body>
</html>
add response
<html>
<body>
<label for="field">Counter</label>
<input id="field" value="4">
</body>
</html>
add response
<html>
<body>
<label for="field">Counter</label>
<input id="field" value="5">
</body>
</html>
$url<-[http://127.0.0.1:8001/FitNesseMock] get mock server url

script browser test
open $url->[http://127.0.0.1:8001/FitNesseMock]
seconds before timeout 1
repeat at most 10 times
refresh until value of Counter is 4
check repeat count 3

script mock xml server setup
stop