Bug Fix for playwright-cli drag, drag is failing with Zod validation error#40146
Open
sachinvarma-sf wants to merge 2 commits intomicrosoft:mainfrom
Open
Bug Fix for playwright-cli drag, drag is failing with Zod validation error#40146sachinvarma-sf wants to merge 2 commits intomicrosoft:mainfrom
sachinvarma-sf wants to merge 2 commits intomicrosoft:mainfrom
Conversation
… endElement not passed to MCP tool
Author
|
@microsoft-github-policy-service agree company="salesforce" |
Author
|
Here’s another issue caused by the same bug - microsoft/playwright-cli#354 |
pavelfeldman
approved these changes
Apr 10, 2026
Contributor
Test results for "MCP"6481 passed, 383 skipped Merge workflow run. |
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.
Expected behavior:
Expected: Drag-and-drop is performed between the two elements.
Actual behavior:
Zod validation error
Additional context
Root Cause:
The CLI daemon's drag command (playwright-core/lib/tools/cli-daemon/commands.js) converts positional args into startRef/endRef but never passes startElement/endElement to the MCP tool
Test added:
npm run ctest-mcp tests/mcp/cli-drag.spec.ts
Running 1 test using 1 worker
✓ 1 [chrome] › tests/mcp/cli-drag.spec.ts:19:5 › drag between elements (3.6s)
1 passed (4.2s)