Encode timeouts the w3c way too
This allows us to get the latest geckodriver using
timeouts properly.
@@ -833,6 +833,7 @@ public void activateEngine(String engine) {
public Timeouts implicitlyWait(long time, TimeUnit unit) {
execute(DriverCommand.SET_TIMEOUT, ImmutableMap.of(
+ "implicit", TimeUnit.MILLISECONDS.convert(time, unit),
"type", "implicit",
"ms", TimeUnit.MILLISECONDS.convert(time, unit)));
return this;
@@ -840,6 +841,7 @@ public Timeouts implicitlyWait(long time, TimeUnit unit) {
public Timeouts setScriptTimeout(long time, TimeUnit unit) {
execute(DriverCommand.SET_TIMEOUT, ImmutableMap.of(
+ "script", TimeUnit.MILLISECONDS.convert(time, unit),
"type", "script",
"ms", TimeUnit.MILLISECONDS.convert(time, unit)));
return this;
@@ -847,6 +849,7 @@ public Timeouts setScriptTimeout(long time, TimeUnit unit) {
public Timeouts pageLoadTimeout(long time, TimeUnit unit) {
execute(DriverCommand.SET_TIMEOUT, ImmutableMap.of(
+ "pageLoad", TimeUnit.MILLISECONDS.convert(time, unit),
"type", "page load",
"ms", TimeUnit.MILLISECONDS.convert(time, unit)));
return this;
