Skip to content

Commit aad7fe4

Browse files
authored
[java] Fix FluentWait's sample usage wrt durations (#10208)
Commit 502301e removed some deprecated methods which used the deprecated TimeUnit class and kept only the overloaded methods that use Java's java.time.Duration class. However, it missed fixing the sample usage at the beginning of the javadoc that still referred to these methods. This patch fixes the issue and replaces the method calls in the sample usage with the newer methods that accept a Duration argument. Fixes #10207
1 parent ad48d31 commit aad7fe4

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

java/src/org/openqa/selenium/support/ui/FluentWait.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,8 +49,8 @@
4949
* // Waiting 30 seconds for an element to be present on the page, checking
5050
* // for its presence once every 5 seconds.
5151
* Wait<WebDriver> wait = new FluentWait<WebDriver>(driver)
52-
* .withTimeout(30, SECONDS)
53-
* .pollingEvery(5, SECONDS)
52+
* .withTimeout(Duration.ofSeconds(30L))
53+
* .pollingEvery(Duration.ofSeconds(5L))
5454
* .ignoring(NoSuchElementException.class);
5555
*
5656
* WebElement foo = wait.until(new Function<WebDriver, WebElement>() {

0 commit comments

Comments
 (0)