Allow named selector to not do partial matching
Nobody has claimed this yet.
- Dominant language
- PHP
- Stars
- 1.6k
- Forks
- 286
- PR merge metrics
- No merged PRs in 30d
Description
Hi, thanks for all the work over the years on this! ❤️
I searched and couldn't find a matching issue (tho #872 covers the same area of the codebase). I'd love to be able to choose to have strict matching when using the named selector (ie named behaves identically to named_exact). It seems currently that the behavior's hardcoded:
And the element finder's instantiated directly in the session constructor:
From my perspective it'd be great to either have a way to override the element finder with my own custom class, or to update the default Mink finder to support switching off fallback partial matching.
Do either of those approaches sound like something you'd consider? If not, is there maybe some other solution?
Thanks!
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with src/Element/ElementFinder.php at lines 48-57 to understand the hardcoded named-selector fallback, then inspect src/Session.php at lines 42-50 to see how the finder is created. Review the discussion around choosing a custom finder versus switching off partial matching. Done means named selectors can opt out of partial matching while named_exact remains consistent.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- php
- Domain
- testing
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Active
- Clarity
- Mostly clear
- Newbie friendliness
- 48/100