Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Duration support for time based utils and helper #306

Open
martingrossmann opened this issue Jan 13, 2023 · 2 comments
Open

Duration support for time based utils and helper #306

martingrossmann opened this issue Jan 13, 2023 · 2 comments
Labels
enhancement New feature or request

Comments

@martingrossmann
Copy link
Contributor

Is your feature request related to a problem? Please describe.
There are some utils and helper classes which can be controlled via one or more time parameters:

The time value is given as int, wich represents seconds or milli seconds. That can be confusing and be a cause of wrong using of that classes/methods.

Describe the solution you'd like
Add Java Duration support and mark current implementations as deprecated.

@martingrossmann martingrossmann added the enhancement New feature or request label Jan 13, 2023
@mreiche
Copy link
Collaborator

mreiche commented Apr 24, 2023

  • Duration is flexible, but IMHO too technically. I would prefer writing waitFor(0.3) instead of waitFor(Duration.ofMillis(300)). I explicitly decided against Duration because of that.
  • Duration supports a lot of time features you may not need in test context. ea. ofNanos(), ofHours(), ofDays()
  • I would support Duration as method overloading, but do not mark the current easy readable implementations as @deprecated

@martingrossmann
Copy link
Contributor Author

martingrossmann commented Jul 27, 2023

Selenium 4 expectes for all timeout and waiter methods Duration. The usage with int and a TimeUnit is deprecated:
https://www.selenium.dev/documentation/webdriver/getting_started/upgrade_to_selenium_4/#waits-and-timeout

I prefer to do the same with Testerra after releasing Testerra 2.4 with Selenium 4

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants