@@ -384,15 +384,32 @@ default Duration getImplicitWaitTimeout() {
384
384
* error code with invalid argument will be returned.
385
385
*
386
386
* @param duration The timeout value.
387
+ * @deprecated Use {@link #scriptTimeout(Duration)}
387
388
* @return A self reference.
388
389
* @see JavascriptExecutor#executeAsyncScript(String, Object...)
389
390
* @see <a href="https://www.w3.org/TR/webdriver/#set-timeouts">W3C WebDriver</a>
390
391
* @see <a href="https://www.w3.org/TR/webdriver/#dfn-timeouts-configuration">W3C WebDriver</a>
391
392
*/
393
+ @ Deprecated
392
394
default Timeouts setScriptTimeout (Duration duration ) {
393
395
return setScriptTimeout (duration .toMillis (), TimeUnit .MILLISECONDS );
394
396
}
395
397
398
+ /**
399
+ * Sets the amount of time to wait for an asynchronous script to finish execution before
400
+ * throwing an error. If the timeout is negative, not null, or greater than 2e16 - 1, an
401
+ * error code with invalid argument will be returned.
402
+ *
403
+ * @param duration The timeout value.
404
+ * @return A self reference.
405
+ * @see JavascriptExecutor#executeAsyncScript(String, Object...)
406
+ * @see <a href="https://www.w3.org/TR/webdriver/#set-timeouts">W3C WebDriver</a>
407
+ * @see <a href="https://www.w3.org/TR/webdriver/#dfn-timeouts-configuration">W3C WebDriver</a>
408
+ */
409
+ default Timeouts scriptTimeout (Duration duration ) {
410
+ return setScriptTimeout (duration );
411
+ }
412
+
396
413
/**
397
414
* Gets the amount of time to wait for an asynchronous script to finish execution before
398
415
* throwing an error. If the timeout is negative, not null, or greater than 2e16 - 1, an
0 commit comments