diff options
Diffstat (limited to 'vid-automation/src/main/java/org/onap/sdc/ci/tests')
-rw-r--r-- | vid-automation/src/main/java/org/onap/sdc/ci/tests/utilities/GeneralUIUtils.java | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/vid-automation/src/main/java/org/onap/sdc/ci/tests/utilities/GeneralUIUtils.java b/vid-automation/src/main/java/org/onap/sdc/ci/tests/utilities/GeneralUIUtils.java index c2c93e734..dd632d201 100644 --- a/vid-automation/src/main/java/org/onap/sdc/ci/tests/utilities/GeneralUIUtils.java +++ b/vid-automation/src/main/java/org/onap/sdc/ci/tests/utilities/GeneralUIUtils.java @@ -642,13 +642,14 @@ public final class GeneralUIUtils { public static void waitForAngular2(){ WebDriverWait wait = newWait(90); wait.until(AdditionalConditions.pageLoadWait()); + waitForLoader(60); try { - WebDriverWait briefWait = newWait(2); + WebDriverWait briefWait = newWait(3); briefWait.until(AdditionalConditions.angular2HasFinishedProcessing()); } catch (TimeoutException | org.openqa.selenium.ScriptTimeoutException e) { logger.info("Ignoring TimeoutException while waiting for angular2: {}", e, e); + waitForLoader(30); } - waitForLoader(10); } public static Object getAllElementAttributes(WebElement element) { @@ -826,4 +827,14 @@ public final class GeneralUIUtils { ultimateWait(); } + public static void acceptDeadObjectException(Runnable todo) { + try { + todo.run(); + } catch (org.openqa.selenium.WebDriverException e) { + if (!e.getMessage().startsWith("TypeError: can't access dead object")) { + throw e; + } + } + } + } |