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 1
1
package io .github .mfaisalkhatri .pages ;
2
2
3
3
import java .time .Duration ;
4
- import java .time .LocalDate ;
5
- import java .time .format .DateTimeFormatter ;
6
4
7
5
import io .github .mfaisalkhatri .data .RegistrationData ;
8
6
import org .openqa .selenium .By ;
9
7
import org .openqa .selenium .WebDriver ;
10
8
import org .openqa .selenium .WebElement ;
9
+ import org .openqa .selenium .interactions .Actions ;
11
10
import org .openqa .selenium .support .ui .ExpectedConditions ;
12
11
import org .openqa .selenium .support .ui .Select ;
13
12
import org .openqa .selenium .support .ui .WebDriverWait ;
@@ -54,8 +53,13 @@ public String pageHeader () {
54
53
}
55
54
56
55
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 ();
59
63
}
60
64
61
65
private WebElement cityField () {
You can’t perform that action at this time.
0 commit comments