<commit_before>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         |
|seconds before timeout|2                 |
|repeat at most        |3           |times|
|refresh until value of|Counter     |is |1|
|check                 |repeat count|0    |

|script|mock xml server setup|
|stop                        |
<commit_msg>Finding in page with frames does not always succeed in 1 seconds (which timeout value based on repeat interval of 100ms)<commit_after>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                        |

{'fraction_non_alphanumeric': 0.1429489238676518, 'fraction_numerical': 0.019595245743655638, 'mean_word_length': 2.4754464285714284, 'pattern_counts': {'":': 0, '<': 51, '<?xml version=': 0, '>': 51, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 4}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 5, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5634077', 'n_tokens_mistral': 989, 'n_tokens_neox': 934, 'n_words': 271}