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

FormValidation API should allow asserting for text in expected location rather than attempting to retrieve the validation area #815

Open
timja opened this issue Jul 6, 2022 · 0 comments

Comments

@timja
Copy link
Member

timja commented Jul 6, 2022

What feature do you want to see added?

The FormValidation API attempts to select the text in the validation area.

public static FormValidation await(Control control, boolean silent) {

But nothing in the API says whether it expects content to be there.

If the JavaScript hasn't fired by the time the selenium code executes then it can sometimes fail to find the content causing flakey tests, one such example was worked around in 650531a

My suggested fix would be either:
a) Matchers query element directly for expected text, that way they can retry if text is not what is expected
b) minor change to API to say whether validation content is expected or not, that way it can retry if getText() doesn't return what it should

Upstream changes

No response

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

No branches or pull requests

1 participant