Skip to content

Commit

Permalink
Adding one more test for an edge case: transparent select with visibl…
Browse files Browse the repository at this point in the history
…e options.
  • Loading branch information
barancev committed Nov 27, 2017
1 parent 6841f91 commit 9cb14e8
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
5 changes: 5 additions & 0 deletions common/src/web/selectPage.html
Original file line number Diff line number Diff line change
Expand Up @@ -61,5 +61,10 @@
<option value="invisible" style="display: none;" class="invisible">Invisible</option>
</select>

<select id="transparent" style="opacity: 0;">
<option value="one">one</option>
<option value="two">two</option>
</select>

</body>
</html>
Original file line number Diff line number Diff line change
Expand Up @@ -157,4 +157,11 @@ public void testCanSetInvisibleOption() {
assertTrue("Expected to be selected", element.isSelected());
}

@Test
public void testCanHandleTransparentSelect() {
driver.get(pages.selectPage);
WebElement element = driver.findElement(By.cssSelector("#transparent option"));
element.click();
assertTrue("Expected to be selected", element.isSelected());
}
}

0 comments on commit 9cb14e8

Please sign in to comment.