Drag-and-Drop Automation is Finally Native in Playwright MCP

Published: · 2 min read

Drag-and-Drop Automation is Finally Native in Playwright MCP

Drag-and-Drop Automation is Finally Native in Playwright MCP

Drag-and-Drop Automation is Finally Native in Playwright MCP

I hate testing drag-and-drop.

Most QA teams do. We either skip it or we write hacks.

I have seen it all. Scripts that try to "flick" the mouse. Scripts that inject JavaScript.

They all break. They are hard to maintain.

This month, Playwright MCP v0.0.71 shipped a fix.

It adds a tool called browser_drop.

Why This Changes Things

Before, your AI agent had to guess how to move an item.

Now, it uses the native Playwright API: Locator.drop.

It works for:

  • Moving cards in a grid.
  • Dropping files into an upload zone.
  • Reordering lists.

It works because it handles the mouse events for you.

No more "faking" the move.

How to Use It

Here is one line of code to use in your MCP tool:

const result = await server.tools.call("browser_drop", {
  source: "text=MyFile.pdf",
  target: "#drop-zone",
});

That is it. One command.

The AI agent finds the file. It moves it to the zone. It drops it.

The "Below the Fold" Gotcha

There is one small catch.

Playwright needs the items to be on your screen to drop them.

If your list is long and the target is at the bottom, the drop will fail.

The Fix: Scroll the target into view first.

// Scroll first, then drop
await server.tools.call("browser_evaluate", {
  expression: `document.querySelector("#drop-zone").scrollIntoView()`,
});


This simple step stops your tests from failing in CI (where screens are smaller).

What Else Is New?

The v0.0.71 release added two more features:

  1. Network Bodies: browser_network_requests now captures the full response from your server. You can check what the API said, not just the status code.
  2. Plain Code: browser_evaluate now takes plain JavaScript. You do not need a function wrapper anymore.

Verdict

If you use AI agents for testing, upgrade today.

browser_drop removes the last big "hack" in our pipeline.

I architect the systems AI agents run on. Native tools like this make those systems stable.

Anton Gulin is the AI QA Architect — the first person to claim this title on LinkedIn. He builds AI-powered test automation systems where AI agents and human engineers collaborate on quality. Former Apple SDET (Apple.com / Apple Card pre-release testing). Find him at anton.qa or on LinkedIn.

Playwright · MCP · AI

Subscribe

Get notified when I publish something new, and unsubscribe at any time.

Related articles

Read all my blog posts

·4 min read

Playwright MCP v0.0.73: How to Configure Browser Paths via Environment Variables

Playwright MCP v0.0.73 fixes a critical gap where extension channels and executable paths couldn't be resolved from CI/CD environment variables. This release enables true containerized test pipelines—configure browser installations once in your Dockerfile, override per job via environment variables, no hardcoded paths required.

Playwright MCP v0.0.73: How to Configure Browser Paths via Environment Variables

·5 min read

browser_run_code_unsafe: The Naming Change That Forces Honest Architecture

Playwright MCP v0.0.72 renamed browser_run_code to browser_run_code_unsafe, making sandbox escape risk explicit. The new browser_network_request tool enables indexed request inspection. Teams using this MCP server in CI pipelines need to update tool references and security documentation now.

browser_run_code_unsafe: The Naming Change That Forces Honest Architecture

·5 min read

Playwright CLI v0.1.10 Brings Spec-Driven Testing Skills for AI Agents

Playwright CLI v0.1.10 introduces a spec-driven testing skill that guides AI agents through plan/generate/heal workflows for maintaining test suites from written specifications. Network inspection now uses stable request indexing, and raw output is default for all data-fetching commands—eliminating preprocessing steps in CI pipelines.

Playwright CLI v0.1.10 Brings Spec-Driven Testing Skills for AI Agents