FileChooser

Playwright\FileChooser\FileChooserInterface

FileChooserInterface for Playwright PHP.

Methods

element()

mixed

Returns input element associated with this file chooser.

function element(): mixed

isMultiple()

bool

Returns whether this file chooser accepts multiple files.

function isMultiple(): bool

page()

PageInterface

Returns page this file chooser belongs to.

function page(): PageInterface

setFiles()

void

Sets the value of the file input this chooser is associated with. If some of the filePaths are relative paths, then they are resolved relative to the current working directory. For empty array, clears the selected files.

function setFiles(string|array $files, array|SetFilesOptions $options = []): void