File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -16,9 +16,10 @@ public MyLocationForm() {
1616 }
1717
1818 public double getLatitude () {
19- if (!lblLatitude .state ().isDisplayed () && btnConsent .state ().isDisplayed ()) {
19+ if (!lblLatitude .state ().isDisplayed () && btnConsent .state ().waitForDisplayed ()) {
2020 clickConsent ();
2121 }
22+ lblLatitude .state ().waitForDisplayed ();
2223 return Double .parseDouble (lblLatitude .getText ());
2324 }
2425
Original file line number Diff line number Diff line change 1010import java .io .File ;
1111import java .io .IOException ;
1212import java .nio .file .Files ;
13- import java .text . SimpleDateFormat ;
14- import java .util . Calendar ;
13+ import java .time . LocalDateTime ;
14+ import java .time . format . DateTimeFormatter ;
1515
1616public class ScreenshotListener extends TestListenerAdapter {
1717 @ Override
1818 public void onTestFailure (ITestResult result ) {
19- Calendar calendar = Calendar .getInstance ();
20- SimpleDateFormat formatter = new SimpleDateFormat ("dd_MM_yyyy_HH_mm_ss" );
21- String dateString = formatter .format (calendar .getTime ());
19+ String dateString = LocalDateTime .now ().format (DateTimeFormatter .ofPattern ("dd_MM_yyyy_HH_mm_ss" ));
2220 String methodName = result .getName ();
2321 if (AqualityServices .isBrowserStarted ()) {
2422 try {
You can’t perform that action at this time.
0 commit comments