@@ -317,6 +317,9 @@ interface Timeouts {
317317 * <p>
318318 * Increasing the implicit wait timeout should be used judiciously as it will have an adverse
319319 * effect on test run time, especially when used with slower location strategies like XPath.
320+ * <p>
321+ * If the timeout is negative, not null, or greater than 2e16 - 1, an error code with invalid
322+ * argument will be returned.
320323 *
321324 * @param time The amount of time to wait.
322325 * @param unit The unit of measure for {@code time}.
@@ -336,6 +339,9 @@ interface Timeouts {
336339 * <p>
337340 * Increasing the implicit wait timeout should be used judiciously as it will have an adverse
338341 * effect on test run time, especially when used with slower location strategies like XPath.
342+ * <p>
343+ * If the timeout is negative, not null, or greater than 2e16 - 1, an error code with invalid
344+ * argument will be returned.
339345 *
340346 * @param duration The duration to wait.
341347 * @return A self reference.
@@ -359,72 +365,84 @@ default Duration getImplicitWaitTimeout() {
359365 * @deprecated Use {@link #setScriptTimeout(Duration)}
360366 *
361367 * Sets the amount of time to wait for an asynchronous script to finish execution before
362- * throwing an error. If the timeout is negative, then the script will be allowed to run
363- * indefinitely .
368+ * throwing an error. If the timeout is negative, not null, or greater than 2e16 - 1, an
369+ * error code with invalid argument will be returned .
364370 *
365371 * @param time The timeout value.
366372 * @param unit The unit of time.
367373 * @return A self reference.
368374 * @see JavascriptExecutor#executeAsyncScript(String, Object...)
375+ * @see <a href="https://www.w3.org/TR/webdriver/#set-timeouts">W3C WebDriver</a>
376+ * @see <a href="https://www.w3.org/TR/webdriver/#dfn-timeouts-configuration">W3C WebDriver</a>
369377 */
370378 @ Deprecated
371379 Timeouts setScriptTimeout (long time , TimeUnit unit );
372380
373381 /**
374382 * Sets the amount of time to wait for an asynchronous script to finish execution before
375- * throwing an error. If the timeout is negative, then the script will be allowed to run
376- * indefinitely .
383+ * throwing an error. If the timeout is negative, not null, or greater than 2e16 - 1, an
384+ * error code with invalid argument will be returned .
377385 *
378386 * @param duration The timeout value.
379387 * @return A self reference.
380388 * @see JavascriptExecutor#executeAsyncScript(String, Object...)
389+ * @see <a href="https://www.w3.org/TR/webdriver/#set-timeouts">W3C WebDriver</a>
390+ * @see <a href="https://www.w3.org/TR/webdriver/#dfn-timeouts-configuration">W3C WebDriver</a>
381391 */
382392 default Timeouts setScriptTimeout (Duration duration ) {
383393 return setScriptTimeout (duration .toMillis (), TimeUnit .MILLISECONDS );
384394 }
385395
386396 /**
387397 * Gets the amount of time to wait for an asynchronous script to finish execution before
388- * throwing an error. If the timeout is negative, then the script will be allowed to run
389- * indefinitely .
398+ * throwing an error. If the timeout is negative, not null, or greater than 2e16 - 1, an
399+ * error code with invalid argument will be returned .
390400 *
391401 * @return The amount of time to wait for an asynchronous script to finish execution.
392402 * @see <a href="https://www.w3.org/TR/webdriver/#get-timeouts">W3C WebDriver</a>
403+ * @see <a href="https://www.w3.org/TR/webdriver/#dfn-timeouts-configuration">W3C WebDriver</a>
393404 */
394405 default Duration getScriptTimeout () {
395406 throw new UnsupportedCommandException ();
396407 }
397408
398409 /**
399- * @deprecated Use {@link #pageLoadTimeout(Duration)}
400- *
401- * Sets the amount of time to wait for a page load to complete before throwing an error.
402- * The timeout value specified should be a positive number.
403- *
404410 * @param time The timeout value.
405411 * @param unit The unit of time.
406412 * @return A Timeouts interface.
413+ * @see <a href="https://www.w3.org/TR/webdriver/#set-timeouts">W3C WebDriver</a>
414+ * @see <a href="https://www.w3.org/TR/webdriver/#dfn-timeouts-configuration">W3C WebDriver</a>
415+ * @deprecated Use {@link #pageLoadTimeout(Duration)}
416+ *
417+ * Sets the amount of time to wait for a page load to complete before throwing an error.
418+ * If the timeout is negative, not null, or greater than 2e16 - 1, an error code with
419+ * invalid argument will be returned.
407420 */
408421 @ Deprecated
409422 Timeouts pageLoadTimeout (long time , TimeUnit unit );
410423
411424 /**
412425 * Sets the amount of time to wait for a page load to complete before throwing an error.
413- * If the timeout is negative, page loads can be indefinite.
426+ * If the timeout is negative, not null, or greater than 2e16 - 1, an error code with
427+ * invalid argument will be returned.
414428 *
415429 * @param duration The timeout value.
416430 * @return A Timeouts interface.
431+ * @see <a href="https://www.w3.org/TR/webdriver/#set-timeouts">W3C WebDriver</a>
432+ * @see <a href="https://www.w3.org/TR/webdriver/#dfn-timeouts-configuration">W3C WebDriver</a>
417433 */
418434 default Timeouts pageLoadTimeout (Duration duration ) {
419435 return pageLoadTimeout (duration .toMillis (), TimeUnit .MILLISECONDS );
420436 }
421437
422438 /**
423439 * Gets the amount of time to wait for a page load to complete before throwing an error.
424- * If the timeout is negative, page loads can be indefinite.
440+ * If the timeout is negative, not null, or greater than 2e16 - 1, an error code with
441+ * invalid argument will be returned.
425442 *
426443 * @return The amount of time to wait for a page load to complete.
427444 * @see <a href="https://www.w3.org/TR/webdriver/#get-timeouts">W3C WebDriver</a>
445+ * @see <a href="https://www.w3.org/TR/webdriver/#dfn-timeouts-configuration">W3C WebDriver</a>
428446 */
429447 default Duration getPageLoadTimeout () {
430448 throw new UnsupportedCommandException ();
@@ -673,27 +691,6 @@ interface Window {
673691 */
674692 void setPosition (Point targetPosition );
675693
676- /**
677- * Get the size of the current window. This will return the outer window dimension, not just
678- * the view port.
679- * <p>
680- * See <a href="https://w3c.github.io/webdriver/#get-window-rect">W3C WebDriver specification</a>
681- * for more details.
682- *
683- * @return The current window size.
684- */
685- Dimension getSize ();
686-
687- /**
688- * Get the position of the current window, relative to the upper left corner of the screen.
689- * <p>
690- * See <a href="https://w3c.github.io/webdriver/#get-window-rect">W3C WebDriver specification</a>
691- * for more details.
692- *
693- * @return The current window position.
694- */
695- Point getPosition ();
696-
697694 /**
698695 * Maximizes the current window if it is not already maximized
699696 * <p>
0 commit comments