FluentWait deprecation impact

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view

FluentWait deprecation impact

John Resler
Hello All,
     I've just migrated a project forward from an older version of Selenium to the most current version (3.12).
The problem I see relates to the FluentWait<T> object. The documentation recommends creation as depicted below: 

Wait<WebDriver> wait = new FluentWait<WebDriver>(driver)
       .withTimeout(30, SECONDS)
       .pollingEvery(5, SECONDS)

The problem is that this version of withTimeout and pollingEvery are deprecated
in lieu of withTimeout(duration) and pollingEvery(duration). 

The problem with the non-deprecated approach is that the Duration object is deprecated which then in effect
deprecates this branch of creation. The result is that there is no way to construct a new FluentWait 
object with the single parameter  constructor that is not deprecated. 
But the single parameter constructor is not deprecated... 

If you follow the path of the new FluentWait<WebDriver>(driver, clock, sleeper) then
you don't run into this issue. Is the intent to force usage of the clock and sleeper objects
in lieu of the duration/time unit mechanisms?

I appreciate any feedback.


- JR

You received this message because you are subscribed to the Google Groups "Selenium Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/selenium-users/7bf57773-f77e-4591-a14d-67afb9ae4387%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.