-
Notifications
You must be signed in to change notification settings - Fork 90
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
[Feature Request] Add a matchExactly flag to text based properties #272
Comments
@sukima thanks for your request, I will try to work on this soon 😄 |
guys I was in need of this feature, thought of raising a pr do let me know for any changes tanks :) cc: @san650 |
hm.. that's surprising to me. I believe that |
just realized we could add support for this directly to the const p = create();
await p.click('Some button text'); fortunately, currently It feels like |
Curious, if there are any real use cases for I'm considering a breaking change in v2, in order to make |
I would guess that sometimes you get generated or random text e.g. an auto-generated id or current date so you want to match part of the label instead of the full text |
contains
andclickOnText
both use text input to find elements and act on them. Currently that textual match will match any subset of the text to search for.Discussed in the slack channel a possible solution is to add a modifier to say we want to match the exact text instead of a subset.
Example
The above will match both buttons.
Alternatively it could look like:
Which will match only the first button.
The text was updated successfully, but these errors were encountered: