puppeteer/docs/api/puppeteer.elementhandle.drag.md

30 lines
730 B
Markdown
Raw Normal View History

2022-07-05 13:41:43 +00:00
---
sidebar_label: ElementHandle.drag
---
# ElementHandle.drag() method
This method creates and captures a dragevent from the element.
#### Signature:
2022-07-05 13:41:43 +00:00
```typescript
class ElementHandle {
drag(
this: ElementHandle<Element>,
target: Point
): Promise<Protocol.Input.DragData>;
2022-07-05 13:41:43 +00:00
}
```
## Parameters
| Parameter | Type | Description |
| --------- | ------------------------------------------------------------ | ----------- |
| this | [ElementHandle](./puppeteer.elementhandle.md)&lt;Element&gt; | |
| target | [Point](./puppeteer.point.md) | |
2022-07-05 13:41:43 +00:00
**Returns:**
Promise&lt;Protocol.Input.DragData&gt;