-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
[Enhancement] Support "suppressNotFoundErrors" option for "waitFor..." commands #2527
Comments
If I well understand, do you want a command that waits for an element that will appear in future? |
@Pieras2 No, this capability already exists by the waitForElementPresent(/Visible) command. I would like to have the ability to suppress the "element was not found error", which might occur, if element does not show up in future. This kind of behaviour was already implemented for other element commands, like getText or getAttribute. |
PR for the same |
I'm afraid this is not how the This flag is only useful for assertions like |
Is your feature request related to a problem? Please describe.
I want to wait for an element beeing present after some time, to be optional only and not failing.
The use case for instance is loading spinner, which blocks any interaction.
The loading spinner may vary in its presence, which might be due to the backend systems.
To circumvent that fact, I use the waitForElementPresent command.
But if the element is not found by selector (of any kind) the command let the test fail.
Describe the solution you'd like
The waitFor commands (or especially the waitForElementPresent command) should allow to define a flag to suppress this not founding.
Describe how the solution will work
In the Page Object's elements selection, the "suppressNotFoundErrors" can be defined optionally.
Whenever this is defined and set to "true", the waitFor command will silently fail and does not propagate higher.
Describe alternatives you've considered
Add a further parameter to the waitFor commands, depicted to suppressNotFoundErrors.
Additional context
Nothing
The text was updated successfully, but these errors were encountered: