Skip to content

Commit

Permalink
try catch replaced with isElementVisibleWithTimeout
Browse files Browse the repository at this point in the history
  • Loading branch information
hms-sgent committed Sep 29, 2022
1 parent 2a53381 commit 9a1ab83
Showing 1 changed file with 2 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2584,13 +2584,8 @@ public EditCaseSteps(
"^I check that vaccination is removed from vaccination card on Edit Case page$",
() -> {
webDriverHelpers.waitForPageLoadingSpinnerToDisappear(10);
boolean elementVisible = true;

try {
webDriverHelpers.isElementEnabled(EDIT_VACCINATION_BUTTON);
} catch (Throwable ignored) {
elementVisible = false;
}
boolean elementVisible =
webDriverHelpers.isElementVisibleWithTimeout(EDIT_VACCINATION_BUTTON, 5);
softly.assertFalse(elementVisible, "Vaccination ID is visible!");
softly.assertAll();
});
Expand Down

0 comments on commit 9a1ab83

Please sign in to comment.