Skip to content

Commit

Permalink
Fixing expected exceptions for invisible elements
Browse files Browse the repository at this point in the history
  • Loading branch information
barancev committed Apr 3, 2017
1 parent a4b3166 commit fd3a074
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion java/client/test/org/openqa/selenium/AlertsTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,7 @@ public void testSettingTheValueOfAnAlertThrows() {
try {
alert.sendKeys("cheese");
fail("Expected exception");
} catch (ElementNotVisibleException expected) {
} catch (ElementNotInteractableException expected) {
} finally {
alert.accept();
}
Expand Down
4 changes: 2 additions & 2 deletions java/client/test/org/openqa/selenium/VisibilityTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ public void testShouldNotBeAbleToClickOnAnElementThatIsNotDisplayed() {
try {
element.click();
fail("You should not be able to click on an invisible element");
} catch (ElementNotVisibleException e) {
} catch (ElementNotInteractableException e) {
// This is expected
}
}
Expand All @@ -124,7 +124,7 @@ public void testShouldNotBeAbleToTypeToAnElementThatIsNotDisplayed() {
try {
element.sendKeys("You don't see me");
fail("You should not be able to send keyboard input to an invisible element");
} catch (ElementNotVisibleException e) {
} catch (ElementNotInteractableException e) {
// This is expected
}

Expand Down

0 comments on commit fd3a074

Please sign in to comment.