Pick the single best match among an ambiguous selector's candidates.
Policy, in order:
Prefer visible matches; fall back to all matches when none are visible
(better to attempt the action and let Playwright's actionability check
report a real reason than to refuse outright).
Among those, take the SMALLEST by area. For the dominant failure mode —
a :has-text() ancestor chain — the smallest match is the innermost
element, which is the element the controller actually meant.
Ties break on document order (lowest index), matching what Playwright's
own non-strict APIs do.
Pick the single best match among an ambiguous selector's candidates.
Policy, in order:
:has-text()ancestor chain — the smallest match is the innermost element, which is the element the controller actually meant.