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

Question: How to use Ensure.thatTheCurrentPage.currentUrl().contains(...) for slow pages #2699

Open
SchnuckySchuster opened this issue Feb 8, 2022 · 4 comments
Labels

Comments

@SchnuckySchuster
Copy link

SchnuckySchuster commented Feb 8, 2022

Hi John,

I'm using Version 3.1.10.
I'd like to use Ensure.thatTheCurrentPage.currentUrl().contains(...) to check that I'm on the right page.
Our application takes sometimes a while to open a page.

It seems like Ensure.thatTheCurrentPage.currentUrl().contains(...) has no timeout, i.e. it doesn't wait a bit

  • Am I correct in the assumption that Ensure.thatTheCurrentPage.currentUrl().contains(...) does not wait?
  • In case it waits, how to extend the wait time?
  • If it doesn't wait can you suggest another approach using Ensure? (I could always use the old way but Ensure looks so much more elegant)

Thanks,
Gerhard

@wakaleo
Copy link
Member

wakaleo commented Feb 8, 2022

Probably best to have a look at the code and see if it can be improved.

@SchnuckySchuster
Copy link
Author

I'd love to, really, but I totally lack the knowledge to read this code.
I'm a mere test code monkey.

@wakaleo
Copy link
Member

wakaleo commented Feb 10, 2022

I can confirm that this assertion simply calls the WebDriver getCurrentUrl() method, and doesn't support any waiting logic.

@SchnuckySchuster
Copy link
Author

Thanks, I will use something else then.

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

No branches or pull requests

2 participants