pub struct FileChooser {
pub(crate) page: Weak<Page>,
pub(crate) element_handle: Weak<ElementHandle>,
pub(crate) is_multiple: bool,
}Expand description
FileChooser objects are dispatched by the page in the page::Event::FileChooser event.
const [fileChooser] = await Promise.all([
page.waitForEvent('filechooser'),
page.click('upload')
]);
await fileChooser.setFiles('myfile.pdf');Fields§
§page: Weak<Page>§element_handle: Weak<ElementHandle>§is_multiple: boolImplementations§
Source§impl FileChooser
impl FileChooser
Sourcefn element(&self) -> ElementHandle
fn element(&self) -> ElementHandle
Returns input element associated with this file chooser.
Sourcefn is_multiple(&self) -> bool
fn is_multiple(&self) -> bool
Returns whether this file chooser accepts multiple files.
Sourcefn set_input_files_builder(&self, file: File) -> SetInputFilesBuilder
fn set_input_files_builder(&self, file: File) -> SetInputFilesBuilder
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§impl FileChooser
impl FileChooser
Trait Implementations§
Source§impl Clone for FileChooser
impl Clone for FileChooser
Source§fn clone(&self) -> FileChooser
fn clone(&self) -> FileChooser
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for FileChooser
impl RefUnwindSafe for FileChooser
impl Send for FileChooser
impl Sync for FileChooser
impl Unpin for FileChooser
impl UnwindSafe for FileChooser
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more