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>
<a href="http://google.com/" id="a">My link</a>
<a href="http://google.nl/" id="b">Mijn link</a>
<a href="http://google.de/" id="c">Meine <span>kleine</span> link</a>
<a href="http://google.fr/" id="d"><img title="French"/></a>
<a href="http://google.es/" id="e"><span aria-label="Spanish">Link</span></a>
<a href="http://google.ru/" id="f" aria-label="Russian">Link</a>
</body>
</html>}}}
script |
mock xml server setup |
add response |
<html>
<body>
<a href="http://google.com/" id="a">My link</a>
<a href="http://google.nl/" id="b">Mijn link</a>
<a href="http://google.de/" id="c">Meine <span>kleine</span> link</a>
<a href="http://google.fr/" id="d"><img title="French"/></a>
<a href="http://google.es/" id="e"><span aria-label="Spanish">Link</span></a>
<a href="http://google.ru/" id="f" aria-label="Russian">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 |
target of link |
id=a |
http://google.com/ |
check |
target of link |
Mijn link |
http://google.nl/ |
check |
target of link |
Mijn |
http://google.nl/ |
check |
target of link |
Meine |
http://google.de/ |
check |
target of link |
klein |
http://google.de/ |
check |
target of link |
French |
http://google.fr/ |
check |
target of link |
Fr |
http://google.fr/ |
check |
target of link |
Spanish |
http://google.es/ |
check |
target of link |
Rus |
http://google.ru/ |
show |
download |
Mijn |
download |
script |
mock xml server setup |
stop |