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

Added NeoWaitTime #296

Open
wants to merge 24 commits into
base: develop
Choose a base branch
from
Open

Added NeoWaitTime #296

wants to merge 24 commits into from

Conversation

georgkunze
Copy link

No description provided.

@georgkunze georgkunze linked an issue Oct 14, 2024 that may be closed by this pull request
Copy link
Contributor

@wurzelkuchen wurzelkuchen left a 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
Copy link
Contributor

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 call Neodymium.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)));
Copy link
Contributor

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
{
Copy link
Contributor

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.

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

Successfully merging this pull request may close these issues.

Provide a Set of Different Waiting Times
3 participants