Refactor: rename parameter 'ref' to 'target' in screenshots.mdx - #2129
Open
Eduardo Severo (eduardonsm) wants to merge 1 commit into
Open
Refactor: rename parameter 'ref' to 'target' in screenshots.mdx#2129Eduardo Severo (eduardonsm) wants to merge 1 commit into
Eduardo Severo (eduardonsm) wants to merge 1 commit into
Conversation
3 tasks
|
Heads-up: opened a broader docs PR that also fixes Tracking: microsoft/playwright#42539 (related to microsoft/playwright#42517). Happy for maintainers to take either your screenshots-only change or the combined PR — no hard feelings either way. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The documentation for browser_take_screenshot incorrectly lists ref as the parameter to capture a screenshot of a specific element. However, the actual JSON schema and implementation of @playwright/mcp expect the parameter name target.
When passing { ref: "e12" } as shown in the documentation, @playwright/mcp does not recognize ref, causing it to ignore the argument and default to capturing the full viewport instead of cropping to the specified element.