module

Playwright::FileChooser

FileChooser objects are dispatched by the page in the page.on('filechooser') event.

Instance methods

element

Returns input element associated with this file chooser.

Source
is_multiple

Returns whether this file chooser accepts multiple files.

Source
page

Returns page this file chooser belongs to.

Source
set_files(file : Path, options : SetFilesOptions | Nil)
Source
set_files(file : Array(Path), options : SetFilesOptions | Nil)
Source
set_files(file : FileChooser::FilePayload, options : SetFilesOptions | Nil)
Source
set_files(file : Array(FileChooser::FilePayload), options : SetFilesOptions | Nil)

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 the current working directory. For empty array, clears the selected files.

Source
set_files(file : Path)
Source
set_files(files : Array(Path))
Source
set_files(file : FileChooser::FilePayload)
Source
set_files(files : Array(FileChooser::FilePayload))
Source

Nested types