HsacAcceptanceTests.SlimTests.BrowserTest.BypassHeuristicTest


This test ensures we can find elements based on explicit technical instructions. We use a mock server running to serve the HTML defined in this page.

The mock server serves the content as text/xml, but the browser does not seem to mind.



variable defined: HTML= {{{ <html> <body> <div id="a3">And some &nbsp; more </div> <button aria-labelledby="a1">Button 1</button> <input name="f" aria-labelledby="a2" value="Piet"> <div aria-labelledby="a3" value="Jan"> <input name="f2" aria-label="The button" value="Add"> <div name="f3" aria-label="The red button">Remove</div> <a href="#">My link</a> </body> </html>}}}


script mock xml server setup
add response
<html>
<body>
<div id="a3">And some &nbsp; more </div>
<button aria-labelledby="a1">Button 1</button>
<input name="f" aria-labelledby="a2" value="Piet">
<div aria-labelledby="a3" value="Jan">
<input name="f2" aria-label="The button" value="Add">
<div name="f3" aria-label="The red button">Remove</div>
<a href="#">My link</a>
</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]
check location $url->[http://127.0.0.1:8001/FitNesseMock]
check value of id=a3 And some more
check normalized value of id=a3 And some more
check value of name=f Piet
enter Hallo as css=input[value='Add']
note Quick check heuristic can also be used
check value of Add Hallo
clear css=input[value='Add']
click link=My link
click partialLink=link
is visible xpath=//div[@aria-labelledby="a3"]
is visible xpath=//div[normalized(@aria-labelledby)="a3"]


script mock xml server setup
stop