module Playwright::FileChooser
Overview
FileChooser objects are dispatched by the page in the page.on('filechooser') event.
Defined in:
playwright/filechooser.crInstance Method Summary
-
#element : ElementHandle
Returns input element associated with this file chooser.
-
#is_multiple : Bool
Returns whether this file chooser accepts multiple files.
-
#page : Page
Returns page this file chooser belongs to.
- #set_files(file : Path, options : SetFilesOptions?)
- #set_files(file : Array(Path), options : SetFilesOptions?)
- #set_files(file : FileChooser::FilePayload, options : SetFilesOptions?)
-
#set_files(file : Array(FileChooser::FilePayload), options : SetFilesOptions?)
Sets the value of the file input this chooser is associated with.
- #set_files(file : Path)
- #set_files(files : Array(Path))
- #set_files(file : FileChooser::FilePayload)
- #set_files(files : Array(FileChooser::FilePayload))
Instance Method Detail
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.