-
Notifications
You must be signed in to change notification settings - Fork 11
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
Added NeoWaitTime #296
base: develop
Are you sure you want to change the base?
Added NeoWaitTime #296
Conversation
5.0.1 release
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Some smaller notes + Need to rework some requirements, will update ticket.
|
||
import com.codeborne.selenide.Selenide; | ||
|
||
public class NeoWaitTime |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
After some reconsideration on how to make this functionality as easy to access as possible (and easy to find without reading the whole documentation), Let's change the approach a bit:
- we do not provide a seperate class for this
- we add the wait methods (like
waitStandardWaitTime()
) directly to the Neodymium Class so that a user can callNeodymium.waitStandardWaitTime()
- we add getter Methods to our config class to get each value as a java.time.Duration object (which is needed for all of Selenides should... methods).
I'll update the ticket for clarification as well.
{ | ||
INSTANCE = new NeoWaitTime(); | ||
} | ||
Selenide.sleep(Integer.valueOf(INSTANCE.customWaitTimeMap.get(key))); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should add a proper handling if the key given is not present and produce a proper error message, otherwise a not very communicative NullPointerException will be thrown
import com.codeborne.selenide.Selenide; | ||
|
||
public class NeoWaitTime | ||
{ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The simple Selenide.Wait()
case is much less common than the $("something").shouldBe(visible, Duration.ofMillis(1000));
case. So for easy access to our property we should offer a java.time.Duration version of each of our waiting times.
No description provided.