Skip to content

Commit

Permalink
Fix for expected error message
Browse files Browse the repository at this point in the history
  • Loading branch information
pnatashap committed Oct 14, 2023
1 parent 91f856e commit 74f1b98
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,9 @@ public void negativeDropdownTest() {
colorsRoot.select("GreyBrownCrimson");
fail("You have selected color that does not exist in dropdown - something went wrong");
} catch (Exception ex) {
assertThat(safeException(ex), containsString("Can't find Element 'MetalAndColorsPage.colorsRoot (>css='div[ui=dropdown]'>xpath='(//div[@ui='dropdown']//li)[.='GreyBrownCrimson']')' during 1 seconds"));
String exMessage = safeException(ex);
assertThat(exMessage, containsString("Can't find Element 'MetalAndColorsPage.colorsRoot ("));
assertThat(exMessage, containsString("xpath='(//div[@ui='dropdown']//li)[.='GreyBrownCrimson']')' during 1 seconds"));
}
}

Expand Down

0 comments on commit 74f1b98

Please sign in to comment.