DropPayload

Playwright\Locator\Options\DropPayload

What a drop carries: files and/or clipboard-like entries keyed by mime type.

Constructor options

OptionTypeDefault
files array []
data array []

Methods

__construct()

A file entry is either a path on disk or an in-memory file whose buffer holds raw bytes. Data entries are keyed by mime type, such as text/plain.

function __construct( public array $files = [], public array $data = [], )

toArray()

array

Buffers travel base64 encoded because the wire format is JSON.

function toArray(): array

from()

self
function from(array|self $payload = []): self