aboutsummaryrefslogtreecommitdiffstats
path: root/integration-tests/src/test/java/org/onap/sdc/frontend/ci/tests/utilities/LoaderHelper.java
diff options
context:
space:
mode:
Diffstat (limited to 'integration-tests/src/test/java/org/onap/sdc/frontend/ci/tests/utilities/LoaderHelper.java')
-rw-r--r--integration-tests/src/test/java/org/onap/sdc/frontend/ci/tests/utilities/LoaderHelper.java11
1 files changed, 10 insertions, 1 deletions
diff --git a/integration-tests/src/test/java/org/onap/sdc/frontend/ci/tests/utilities/LoaderHelper.java b/integration-tests/src/test/java/org/onap/sdc/frontend/ci/tests/utilities/LoaderHelper.java
index 0170fbf074..4149a91a2a 100644
--- a/integration-tests/src/test/java/org/onap/sdc/frontend/ci/tests/utilities/LoaderHelper.java
+++ b/integration-tests/src/test/java/org/onap/sdc/frontend/ci/tests/utilities/LoaderHelper.java
@@ -19,13 +19,22 @@
package org.onap.sdc.frontend.ci.tests.utilities;
+import lombok.NoArgsConstructor;
import org.onap.sdc.frontend.ci.tests.execute.setup.DriverFactory;
import org.openqa.selenium.By;
+import org.openqa.selenium.WebDriver;
import org.openqa.selenium.support.ui.ExpectedConditions;
import org.openqa.selenium.support.ui.WebDriverWait;
+@NoArgsConstructor
public class LoaderHelper {
+ private WebDriver webDriver;
+
+ public LoaderHelper(final WebDriver webDriver) {
+ this.webDriver = webDriver;
+ }
+
private final By locator = By.className("tlv-loader");
public void waitForLoader(final int timeout) {
@@ -43,7 +52,7 @@ public class LoaderHelper {
}
private WebDriverWait getWait(final int timeout) {
- return new WebDriverWait(DriverFactory.getDriver(), timeout);
+ return new WebDriverWait(webDriver == null ? DriverFactory.getDriver() : webDriver, timeout);
}
}