summaryrefslogtreecommitdiffstats
path: root/vid-automation/src/main/java/org/onap/sdc
diff options
context:
space:
mode:
authorIttay Stern <ittay.stern@att.com>2020-01-02 12:00:56 +0200
committerIttay Stern <ittay.stern@att.com>2020-01-02 15:32:49 +0200
commit966a6edb60ac187253b8801733ffc7e52fc45392 (patch)
tree44477c45697c1ec1c8f0fdeff4465c473fd61bca /vid-automation/src/main/java/org/onap/sdc
parentfa4d3e58748b5e35961f40bfec579ab8c14bae95 (diff)
Be more graceful for timeouts while Selenium
Issue-ID: VID-647 Change-Id: I0137af588d01b8cad7a9d26ac9789d1685ad0c02 Signed-off-by: Ittay Stern <ittay.stern@att.com>
Diffstat (limited to 'vid-automation/src/main/java/org/onap/sdc')
-rw-r--r--vid-automation/src/main/java/org/onap/sdc/ci/tests/utilities/GeneralUIUtils.java15
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;
+ }
+ }
+ }
+
}