|
17 | 17 | import org.openqa.selenium.remote.RemoteWebDriver; |
18 | 18 | import org.openqa.selenium.safari.SafariDriver; |
19 | 19 | import org.openqa.selenium.safari.SafariOptions; |
| 20 | +import org.openqa.selenium.support.ui.WebDriverWait; |
20 | 21 | import org.slf4j.Logger; |
21 | 22 | import org.slf4j.LoggerFactory; |
22 | 23 | import org.springframework.beans.factory.annotation.Autowired; |
|
28 | 29 | import java.io.IOException; |
29 | 30 | import java.io.InputStreamReader; |
30 | 31 | import java.net.URL; |
| 32 | +import java.time.Duration; |
31 | 33 | import java.util.Arrays; |
32 | 34 | import java.util.Locale; |
33 | 35 | import java.util.NoSuchElementException; |
@@ -102,8 +104,8 @@ public void setLocalWebDriver() throws IOException { |
102 | 104 | default -> |
103 | 105 | throw new NoSuchElementException("Failed to create an instance of WebDriver for: " + applicationProperties.getBrowser()); |
104 | 106 | } |
105 | | -// driverWait.getDriverWaitThreadLocal() |
106 | | -// .set(new WebDriverWait(driverThreadLocal.get(), Duration.ofSeconds(Constants.timeoutShort), Duration.ofSeconds(Constants.pollingShort))); |
| 107 | + driverWait.getDriverWaitThreadLocal() |
| 108 | + .set(new WebDriverWait(driverThreadLocal.get(), Duration.ofSeconds(Constants.timeoutShort), Duration.ofSeconds(Constants.pollingShort))); |
107 | 109 | } |
108 | 110 |
|
109 | 111 | private void setRemoteDriver(URL hubUrl) { |
@@ -135,8 +137,8 @@ private void setRemoteDriver(URL hubUrl) { |
135 | 137 | default -> |
136 | 138 | throw new NoSuchElementException("Failed to create an instance of RemoteWebDriver for: " + applicationProperties.getBrowser()); |
137 | 139 | } |
138 | | -// driverWait.getDriverWaitThreadLocal() |
139 | | -// .set(new WebDriverWait(driverThreadLocal.get(), Duration.ofSeconds(Constants.timeoutShort), Duration.ofSeconds(Constants.pollingShort))); |
| 140 | + driverWait.getDriverWaitThreadLocal() |
| 141 | + .set(new WebDriverWait(driverThreadLocal.get(), Duration.ofSeconds(Constants.timeoutShort), Duration.ofSeconds(Constants.pollingShort))); |
140 | 142 | } |
141 | 143 |
|
142 | 144 | public WebDriver getDriver() { |
|
0 commit comments