HsacAcceptanceTests.SlimTests.BrowserTest.ClickEmptySelectOption



variable defined: HTML= {{{ <!DOCTYPE html> <html> <body> <label>Empty option <select id="1"> <option></option> <option>2</option> <option>3</option> <option>4</option> </select> </label> <label>Whitespace option <select id="2"> <option> </option> <option>2</option> <option>3</option> <option>4</option> </select> </label> <label>Nested empty option <select id="3"> <option><span></span></option> <option>2</option> <option>3</option> <option>4</option> </select> </label> <label>Nested whitespace option <select id="4"> <option><span> </span></option> <option>2</option> <option>3</option> <option>4</option> </select> </label> <label>Multiple nested whitespace options <select id="5"> <option><span> <span> <span> </span></option> <option>2</option> <option>3</option> <option>4</option> </select> </label> </body> </html>}}}

script mock xml server setup
add response
<!DOCTYPE html>
<html>
<body>
<label>Empty option
	<select id="1">
		<option></option>
		<option>2</option>
		<option>3</option>
		<option>4</option>
	</select>
</label>

<label>Whitespace option
	<select id="2">
		<option> </option>
		<option>2</option>
		<option>3</option>
		<option>4</option>
	</select>
</label>

<label>Nested empty option
	<select id="3">
		<option><span></span></option>
		<option>2</option>
		<option>3</option>
		<option>4</option>
	</select>
</label>

<label>Nested whitespace option
	<select id="4">
		<option><span> </span></option>
		<option>2</option>
		<option>3</option>
		<option>4</option>
	</select>
</label>

<label>Multiple nested whitespace options
	<select id="5">
		<option><span> <span> <span> </span></option>
		<option>2</option>
		<option>3</option>
		<option>4</option>
	</select>
</label>
</body>
</html>
$url<-[http://127.0.0.1:8001/FitNesseMock] get mock server url

scenario check select selector with empty option
check value of @{selector} =~/^$/
select 3 for @{selector}
check value of @{selector} 3
select for @{selector}
check value of @{selector} =~/^$/


script browser test
open $url->[http://127.0.0.1:8001/FitNesseMock]
check select id=1 with empty option
scenario check select selector with empty option
check value of id=1 /^$/ found in:
select 3 for id=1
check value of id=1 3
select for id=1
check value of id=1 /^$/ found in:
check select id=2 with empty option
scenario check select selector with empty option
check value of id=2 /^$/ found in:
select 3 for id=2
check value of id=2 3
select for id=2
check value of id=2 /^$/ found in:
check select id=3 with empty option
scenario check select selector with empty option
check value of id=3 /^$/ found in:
select 3 for id=3
check value of id=3 3
select for id=3
check value of id=3 /^$/ found in:
check select id=4 with empty option
scenario check select selector with empty option
check value of id=4 /^$/ found in:
select 3 for id=4
check value of id=4 3
select for id=4
check value of id=4 /^$/ found in:
check select id=5 with empty option
scenario check select selector with empty option
check value of id=5 /^$/ found in:
select 3 for id=5
check value of id=5 3
select for id=5
check value of id=5 /^$/ found in:

script mock xml server setup
stop