Skip to content

Commit 9cb14e8

Browse files
committed
Adding one more test for an edge case: transparent select with visible options.
1 parent 6841f91 commit 9cb14e8

File tree

2 files changed

+12
-0
lines changed

2 files changed

+12
-0
lines changed

common/src/web/selectPage.html

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,5 +61,10 @@
6161
<option value="invisible" style="display: none;" class="invisible">Invisible</option>
6262
</select>
6363

64+
<select id="transparent" style="opacity: 0;">
65+
<option value="one">one</option>
66+
<option value="two">two</option>
67+
</select>
68+
6469
</body>
6570
</html>

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

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -157,4 +157,11 @@ public void testCanSetInvisibleOption() {
157157
assertTrue("Expected to be selected", element.isSelected());
158158
}
159159

160+
@Test
161+
public void testCanHandleTransparentSelect() {
162+
driver.get(pages.selectPage);
163+
WebElement element = driver.findElement(By.cssSelector("#transparent option"));
164+
element.click();
165+
assertTrue("Expected to be selected", element.isSelected());
166+
}
160167
}

0 commit comments

Comments
 (0)