{
  "slug": "playwright-locator-drop-simulates-external-drag-and-drop-8cb857962ef8",
  "title": "Playwright locator.drop() simulates external drag-and-drop",
  "tools": [
    "playwright"
  ],
  "tags": [
    "agent"
  ],
  "introduced_at": "2026-05-11T19:08:18.000Z",
  "announced_at": "2026-05-11T19:08:18.000Z",
  "effective_at": null,
  "date_basis": "source-publication",
  "status": "unknown",
  "how": {
    "incantation": "When testing an element that accepts external file or clipboard-like drops, call `locator.drop()` with a `files` payload, a MIME-type-to-string `data` map, or both.",
    "examples": [
      "await page.locator('<dropzone-selector>').drop({ files: { name: 'note.txt', mimeType: 'text/plain', buffer: Buffer.from('hello') } });",
      "await page.locator('<dropzone-selector>').drop({ data: { 'text/plain': 'hello world', 'text/uri-list': 'https://example.com' } });"
    ],
    "gotchas": [
      "Version: v1.60.0",
      "payload.files: File paths or in-memory buffers; file objects use `name` (file name), `mimeType` (file type), and `buffer` (file content).",
      "payload.data: MIME-type-to-string map for clipboard-like content; may be used with `files` or by itself.",
      "options.position: Target point relative to the element’s padding-box top-left; defaults to a visible point.",
      "options.timeout: Maximum time in milliseconds; defaults to 0 (no timeout).",
      "Prerequisite: `locator.drop()` was added in Playwright v1.60.",
      "Works cross-browser."
    ]
  },
  "why_it_matters": "Test a page's file upload zone or other drag-and-drop target.",
  "sources": [
    "https://github.com/microsoft/playwright/releases/tag/v1.60.0",
    "https://playwright.dev/docs/api/class-locator#locator-drop"
  ],
  "rank": 0.98052,
  "judge": {
    "publish": true,
    "judge_model": "codex-cli/gpt-6-luna+typesafe/jev-1.13.0",
    "prompt_version": "extract-v7+enrich-v1+judge-v2x3+jev-publish-v1"
  },
  "review_state": "approved",
  "provenance": {
    "run_id": "backfill-20261007",
    "verdict_id": "backfill-20261007:backfill-20261007-15228fe3d33f40e5-1:gate",
    "evidence_hash": "8d2217b180ed48f8295026249b4e63507609b51ecea3842ff24b521ee9c9c11e"
  },
  "review": {
    "draft_hash": "e81cbfbbe8204e7d82f722a92508057a41cefb74c09fa364943dcb5cbe54a99d",
    "reviewer": "publication-gate",
    "reviewed_at": "2026-10-07T00:00:00.000Z",
    "decision": "backfill-20261007:gate",
    "reason": "3 of 3 judge runs approved with p_yes >= 0.9 (mean 0.98 >= 0.9; 2 needed) and Jev gave 0.80 (>= 0.6 needed)."
  }
}
