Skip to content

Commit

Permalink
do not use hard coded Url
Browse files Browse the repository at this point in the history
  • Loading branch information
strehle committed Sep 24, 2024
1 parent a79cb12 commit 8822c3f
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package org.cloudfoundry.identity.uaa.integration.pageObjects;

import java.time.Duration;
import java.util.concurrent.TimeUnit;

import org.hamcrest.Matcher;
import org.openqa.selenium.By;
Expand Down Expand Up @@ -52,8 +53,8 @@ public void clearCookies() {
}

public static void validateUrlStartsWithWait(WebDriver driver, String currentUrlStart) throws InterruptedException {
if (!driver.getCurrentUrl().startsWith("https://www.google.com")) {
Thread.sleep(5000);
if (!driver.getCurrentUrl().startsWith(currentUrlStart)) {
TimeUnit.SECONDS.sleep(5);
}
assertThat(driver.getCurrentUrl(), startsWith(currentUrlStart));
}
Expand Down

0 comments on commit 8822c3f

Please sign in to comment.