Skip to content

Commit c1e687c

Browse files
committed
fix: Make unit tests compatible with Selenium 4.33.0+
1 parent 3e5f9e2 commit c1e687c

File tree

1 file changed

+16
-1
lines changed

1 file changed

+16
-1
lines changed

src/test/java/io/appium/java_client/pagefactory_tests/widget/tests/AbstractStubWebDriver.java

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
import org.openqa.selenium.logging.Logs;
1212
import org.openqa.selenium.remote.Response;
1313

14+
import java.time.Duration;
1415
import java.util.HashSet;
1516
import java.util.List;
1617
import java.util.Map;
@@ -155,11 +156,25 @@ public Cookie getCookieNamed(String name) {
155156
@Override
156157
public Timeouts timeouts() {
157158
return new Timeouts() {
158-
@Override
159+
/**
160+
* Does nothing.
161+
*
162+
* @param time The amount of time to wait.
163+
* @param unit The unit of measure for {@code time}.
164+
* @return A self reference.
165+
* @deprecated Kept for the backward compatibility, should be removed when a minimum Selenium
166+
* version is bumped to 4.33.0 or higher.
167+
*/
168+
@Deprecated
159169
public Timeouts implicitlyWait(long time, TimeUnit unit) {
160170
return this;
161171
}
162172

173+
@Override
174+
public Timeouts implicitlyWait(Duration duration) {
175+
return this;
176+
}
177+
163178
@Override
164179
public Timeouts setScriptTimeout(long time, TimeUnit unit) {
165180
return this;

0 commit comments

Comments
 (0)