File tree Expand file tree Collapse file tree 1 file changed +8
-4
lines changed
src/test/java/io/github/mfaisalkhatri/pages Expand file tree Collapse file tree 1 file changed +8
-4
lines changed Original file line number Diff line number Diff line change 11package io .github .mfaisalkhatri .pages ;
22
33import java .time .Duration ;
4- import java .time .LocalDate ;
5- import java .time .format .DateTimeFormatter ;
64
75import io .github .mfaisalkhatri .data .RegistrationData ;
86import org .openqa .selenium .By ;
97import org .openqa .selenium .WebDriver ;
108import org .openqa .selenium .WebElement ;
9+ import org .openqa .selenium .interactions .Actions ;
1110import org .openqa .selenium .support .ui .ExpectedConditions ;
1211import org .openqa .selenium .support .ui .Select ;
1312import org .openqa .selenium .support .ui .WebDriverWait ;
@@ -54,8 +53,13 @@ public String pageHeader () {
5453 }
5554
5655 public String passwordAlertMessage () {
57- return wait .until (ExpectedConditions .visibilityOfElementLocated (By .cssSelector (".alert-danger div" )))
58- .getText ();
56+ WebElement warningMessage = wait .until (
57+ ExpectedConditions .visibilityOfElementLocated (By .cssSelector (".alert-danger div" )));
58+ Actions actions = new Actions (driver );
59+ actions .moveToElement (warningMessage )
60+ .build ()
61+ .perform ();
62+ return warningMessage .getText ();
5963 }
6064
6165 private WebElement cityField () {
You can’t perform that action at this time.
0 commit comments