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

Validation like seeThat/Ensure is not waiting for action to complete {serenity version - 3.2.0} #2738

Closed
ag-gggp opened this issue Mar 3, 2022 · 4 comments

Comments

@ag-gggp
Copy link

ag-gggp commented Mar 3, 2022

I'm implementing the serenity latest version - 3.2.0 with cucumber. Earlier it was working fine for all sorts of validations like seeThat/Ensure. However, with the recent change to 3.2.0, the above validation calls are failing as they're not waiting for the action to complete.

seeThat(WebElementQuestion.the({target-locators}), isCurrentlyVisible())

Like in my case, when I click on Continue/Submit button, the user is navigated to a new page. But the call itself is failing before coming to the landing page. The implicit wait is above 10 seconds, and the page is loading in 4 seconds.

If I revert to the old versions, like 2.5.7 it works fine.

Please suggest.

@wakaleo

@wakaleo
Copy link
Member

wakaleo commented Mar 4, 2022

That sounds like the intended behavior. isCurrentlyVisible() should not wait (thats what the "currently" means). Try with isVisible()

@ag-gggp
Copy link
Author

ag-gggp commented Mar 4, 2022

@wakaleo

I've tried with isVisible too, but the same behavior. Not waiting for the action to complete.

seeThat(the({target-element}), isVisible())

@wakaleo
Copy link
Member

wakaleo commented Mar 4, 2022

What makes you think it is not waiting? In version 3.2.0, isVisible() will use the webdriver.wait.for.timeout property to determine how long it will wait, with a default of 5 seconds. If you have any doubts, put a breakpoint in the IsVisibleMatcher to understand how the code works under the hood.

@ag-gggp ag-gggp closed this as completed Jul 6, 2023
@ag-gggp
Copy link
Author

ag-gggp commented Jul 6, 2023

Working fine, no more an issue. Happy to close it. 😄

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