Skip to content

Commit 0e41af5

Browse files
committed
Encode timeouts the w3c way too
This allows us to get the latest geckodriver using timeouts properly.
1 parent 4bba294 commit 0e41af5

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

java/client/src/org/openqa/selenium/remote/RemoteWebDriver.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -833,20 +833,23 @@ protected class RemoteTimeouts implements Timeouts {
833833

834834
public Timeouts implicitlyWait(long time, TimeUnit unit) {
835835
execute(DriverCommand.SET_TIMEOUT, ImmutableMap.of(
836+
"implicit", TimeUnit.MILLISECONDS.convert(time, unit),
836837
"type", "implicit",
837838
"ms", TimeUnit.MILLISECONDS.convert(time, unit)));
838839
return this;
839840
}
840841

841842
public Timeouts setScriptTimeout(long time, TimeUnit unit) {
842843
execute(DriverCommand.SET_TIMEOUT, ImmutableMap.of(
844+
"script", TimeUnit.MILLISECONDS.convert(time, unit),
843845
"type", "script",
844846
"ms", TimeUnit.MILLISECONDS.convert(time, unit)));
845847
return this;
846848
}
847849

848850
public Timeouts pageLoadTimeout(long time, TimeUnit unit) {
849851
execute(DriverCommand.SET_TIMEOUT, ImmutableMap.of(
852+
"pageLoad", TimeUnit.MILLISECONDS.convert(time, unit),
850853
"type", "page load",
851854
"ms", TimeUnit.MILLISECONDS.convert(time, unit)));
852855
return this;

0 commit comments

Comments
 (0)