This test ensures that we can keep refreshing a page until a condition is met by one of its iframes.

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

!define HTML_MAIN1 { {{{
<html>
<title>Start Page Title</title>
<body>
<iframe id="iframe1" src="frame1.html"></iframe>
<iframe id="iframe2" src="frame2.html"></iframe>
</body>
</html>}}} }

!define HTML_FRAME1_1 { {{{
<html>
<body>
<input name="remove1" type="button" value="Remove1">
</body>
</html>}}} }


!define HTML_FRAME1_2 { {{{
<html>
<body>
<label id="label" for="field">Teller</label>
<input id="field" value="1">
<script type="text/javascript">
    window.onload = function() {
		setTimeout(function() { document.getElementById("label").innerHTML = "Counter"; }, 1500);
    }
</script>
</body>
</html>}}} }

|script      |mock xml server setup                              |
|add response|${HTML_MAIN1}                                      |
|add response|${HTML_FRAME1_1}|for|GET: /FitNesseMock/frame1.html|
|add response|${HTML_FRAME1_2}|for|GET: /FitNesseMock/frame2.html|
|$url=       |get mock server url                                |

|script                |browser test             |
|open                  |$url/main                |
|set repeat interval to|2000        |milliseconds|
|repeat at most        |3           |times       |
|refresh until value of|Counter     |is|1        |
|check                 |repeat count|0           |

|script|mock xml server setup|
|stop                        |

