class Playwright::FileChooser
“‘
file_chooser.set_files(“myfile.pdf”)
file_chooser = fc_info.value
page.get_by_text(“Upload file”).click()
with page.expect_file_chooser() as fc_info:
“`python sync
`FileChooser` objects are dispatched by the page in the [`event: Page.fileChooser`] event.
def element
def element wrap_impl(@impl.element) end
def multiple?
def multiple? wrap_impl(@impl.multiple?) end
def page
def page wrap_impl(@impl.page) end
def set_files(files, noWaitAfter: nil, timeout: nil)
Sets the value of the file input this chooser is associated with. If some of the `filePaths` are relative paths, then
def set_files(files, noWaitAfter: nil, timeout: nil) wrap_impl(@impl.set_files(unwrap_impl(files), noWaitAfter: unwrap_impl(noWaitAfter), timeout: unwrap_impl(timeout))) end