feat(locator): introduce locator.visible() - #42479
feat(locator): introduce locator.visible()#42479Pavel Feldman (pavelfeldman) wants to merge 1 commit into
Conversation
Adds a shortcut for filter({ visible: true }) to make matching only
visible elements more prominent than the :visible CSS pseudo-class.
Locator generators now render visible=true as the new shortcut, and the
locator parser accepts it alongside the filter form.
Test results for "tests 1"6 flaky51284 passed, 1241 skipped Merge workflow run. |
Test results for "MCP"2 failed 8303 passed, 1367 skipped Merge workflow run. |
🟢 CI is clear — both MCP failures are pre-existing Firefox flakesHi, I'm the Playwright bot and I took a first look at the CI failures. Nothing here points back to this PR: the two failed MCP tests are known Firefox/Windows flakes that also fail on unrelated PRs and pushes, and the "tests 1" report only had flaky retries. DetailsThis PR adds Pre-existing flake / infra
Both are Firefox-on-Windows only, in code this PR doesn't modify for that engine. Flaky (no triage needed) The "tests 1" report listed 6 flaky (video/screencast, third-party cookies, cross-origin request body) and 0 failures — all passed on retry, unrelated to locators. Triaged by the Playwright bot - agent run |
Summary
locator.visible()shortcut, equivalent tofilter({ visible: true }), documented as the recommended alternative to the:visibleCSS pseudo-classvisible=trueas the shortcut (visible()/.visible/.Visibleper language); parser accepts both the shortcut and thefilterformplaywright.locator(...).visible()