Skip to content

docs(cli): clarify generated locator page state - #42791

Open
Devin Rousso (dcrousso) wants to merge 1 commit into
microsoft:mainfrom
dcrousso:fix-42790
Open

Devin Rousso (dcrousso) wants to merge 1 commit into
microsoft:mainfrom
dcrousso:fix-42790

Conversation

@dcrousso

Copy link
Copy Markdown
Contributor

generated locators can become ambiguous when page state changes or replays leave duplicate test data

explain how to restore the intended state and handle strict mode violations without hiding ambiguity with .first()

fixes #42790

generated locators can become ambiguous when page state changes or replays leave duplicate test data

explain how to restore the intended state and handle strict mode violations without hiding ambiguity with `.first()`
@github-actions

Copy link
Copy Markdown
Contributor

Test results for "MCP"

2 failed
❌ [chrome] › mcp/screenshot.spec.ts:142 › browser_take_screenshot (default type should be png) @mcp-ubuntu-latest-chrome
❌ [firefox] › mcp/cli-core.spec.ts:70 › dblclick @mcp-windows-latest-firefox

8690 passed, 1474 skipped


Merge workflow run.

@github-actions

Copy link
Copy Markdown
Contributor

Hi, I'm the Playwright bot and I took a look at the failing CI runs here.

🟢 Both failures are pre-existing noise — this PR is clear

This PR touches one markdown file (references/test-generation.md, a CLI skill reference) and no product code, so neither the MCP screenshot path nor the CLI dblclick path can be reached by the diff. Both failures have independent evidence elsewhere in CI.

Details

Pre-existing flake

Infra

  • [chrome] › mcp/screenshot.spec.ts:142 › browser_take_screenshot (default type should be png) (mcp-ubuntu-latest-chrome) — the tool returned an error instead of an image:

    Error: browserBackend.callTool: Protocol error (Page.captureScreenshot): Unable to capture screenshot
    

    That's a CDP-level capture failure from the browser, not an assertion about anything this PR changed. The same Unable to capture screenshot error shows up across unrelated tests, bots and shas — page/page-screenshot.spec.ts › should take fullPage screenshots during navigation hit it on 10 distinct shas on tracing-chromium, and mcp/cli-save-as.spec.ts › screenshot --filename hit it on this very same mcp-ubuntu-latest-chrome bot.

    Being honest about the limit: this exact test has failed only this once in 724 runs, so I can't point at a prior failure of this title. The cross-test, cross-sha spread of the identical browser-side error is what I'm leaning on.

Both should go green on a rerun.

Triaged by the Playwright bot - agent run

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[CLI]: skill doesn't warn that a generated locator is only unique against the current page state

1 participant