Version: 1.8.0


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

const [fileChooser] = await Promise.all([
await fileChooser.setFiles('myfile.pdf');


Returns input element associated with this file chooser.


Returns whether this file chooser accepts multiple files.

Returns page this file chooser belongs to.

fileChooser.setFiles(files[, options])#

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.