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

Modify the default wait time for @Visible annotations #148

Closed
davecpayne opened this issue Nov 28, 2019 · 2 comments
Closed

Modify the default wait time for @Visible annotations #148

davecpayne opened this issue Nov 28, 2019 · 2 comments

Comments

@davecpayne
Copy link

Per my question on StackOverflow: https://stackoverflow.com/questions/59052480/is-there-any-way-to-increase-the-default-wait-in-frameworkium-for-visible-anno

I presume there's no way to increase the default timeout while waiting for an element to be @Visible, since this seems to be hard-coded in UITestLifecycle. Is that correct? Is there any workaround besides not using that annotation and doing it the 'standard' Selenium way (in which case I'm not sure the benefits of Frameworkium would outweigh the downsides).

@davecpayne davecpayne changed the title Increase the default wait time for @Visible annotations Modify the default wait time for @Visible annotations Nov 28, 2019
@ham1
Copy link
Member

ham1 commented Nov 28, 2019

I've just also answered the question on SO.

The @Visible uses the wait defined on the Page object.

Therefore, if you'd like to change it you have to change the way the page is constructed. There are two options for this:

  1. If you are using the PageFactory you can use PageFactory.newInstance(MyPage.class, Duration.of(20, SECONDS))
  2. new MyPage().get(Duration.ofSeconds(20))
  3. Don't use @Visible on slow/variable pages

or, if this is popular we would consider customising the default (PRs welcome).

Another solution would be to speed up your page loads as, unless >10s is an acceptable time for users to wait, this would likely have better longer term outcomes :)

@davecpayne
Copy link
Author

Ah, brilliant, thank you, I'll give that a try. I think it's only the one page, so I'll look at those options.

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

No branches or pull requests

2 participants