Playwright · Middle · Question 46 of 75
How do you drag an item onto a drop zone?
- 1
await item.drop(dropZone) - 2
await item.dragTo(dropZone) - 3
await page.drag(item, dropZone)
Show the answer
Correct answer: await item.dragTo(dropZone)
Explanation
dragTo does the mouse down, move and up. Libraries with custom logic may need manual page.mouse steps.