Skip to content

Commit 1b1bbf4

Browse files
committed
step one, add the failing test, for firefox not being able to select the out of view multi select option
1 parent 5a8a3de commit 1b1bbf4

File tree

2 files changed

+19
-2
lines changed

2 files changed

+19
-2
lines changed

common/src/web/selectPage.html

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
<option value="one">one</option>
1010
<option value="two" />two</option>
1111
</select>
12-
12+
1313
<select id="selectWithMultipleEqualsMultiple" multiple="multiple">
1414
<option selected="selected" label="emmental">Emmental</option>
1515
<option label="roquefort">Roquefort</option>
@@ -26,7 +26,7 @@
2626
<option value="one">one</option>
2727
<option value="two">two</option>
2828
</select>
29-
29+
3030
<select id="selectWithRandomMultipleValue" multiple="somethingElse">
3131
<option value="one">one</option>
3232
<option value="two">two</option>
@@ -38,5 +38,14 @@
3838
<option id="two-in-group" value="two">two</option>
3939
</optgroup>
4040
</select>
41+
42+
<select id="selectWithMultipleLongList" multiple>
43+
<option>one</option>
44+
<option>two</option>
45+
<option>three</option>
46+
<option>four</option>
47+
<option>five</option>
48+
<option>six</option>
49+
</select>
4150
</body>
4251
</html>

java/client/test/org/openqa/selenium/SelectElementHandlingTest.java

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -126,4 +126,12 @@ public void testCanGetValueFromOptionViaAttributeWhenAttributeIsEmptyString() {
126126
WebElement element = driver.findElement(By.id("optionEmptyValueSet"));
127127
assertThat(element.getAttribute("value"), is(""));
128128
}
129+
130+
@Test
131+
public void testCanSelectFromMultipleSelectWhereValueIsBelowVisibleRange() {
132+
driver.get(pages.selectPage);
133+
WebElement option = driver.findElements(By.cssSelector("#selectWithMultipleLongList option")).get(4);
134+
option.click();
135+
assertThat(option.isSelected(), is(true));
136+
}
129137
}

0 commit comments

Comments
 (0)