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.


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


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

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


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

!define 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}              |
|add response|${HTML2}             |
|add response|${HTML3}             |
|add response|${HTML4}             |
|add response|${HTML5}             |
|$url=       |get mock server url  |

|script                |browser test                                                 |
|open                  |$url                                                         |
|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|<10000                                  |

|script|mock xml server setup|
|stop                        |
