[java] Fixing a test of finding elements by an empty id to match W3C requirements
@@ -114,13 +114,12 @@ public void testFindingASingleElementByEmptyIdShouldThrow() {
}
@Test
- @NotYetImplemented(value = MARIONETTE, reason = "https://bugzilla.mozilla.org/show_bug.cgi?id=1204504")
- @NotYetImplemented(SAFARI)
- @NotYetImplemented(EDGE)
- public void testFindingMultipleElementsByEmptyIdShouldReturnEmptyList() {
+ @NotYetImplemented(FIREFOX)
+ @NotYetImplemented(HTMLUNIT)
+ public void testFindingMultipleElementsByEmptyIdShouldThrow() {
driver.get(pages.formPage);
- List<WebElement> elements = driver.findElements(By.id(""));
- assertThat(elements.size()).isEqualTo(0);
+ assertThatExceptionOfType(NoSuchElementException.class)
+ .isThrownBy(() -> driver.findElements(By.id("")));
}
@Test
