pub struct FileChooser { /* private fields */ }Expand description
A file chooser dialog.
File choosers are emitted via the page.on_filechooser() callback or can be
obtained using page.wait_for_file_chooser().
Note: You must call page.set_intercept_file_chooser(true) before the
file chooser dialog is opened.
§Example
// Enable file chooser interception
page.set_intercept_file_chooser(true).await.unwrap();
// File chooser would be obtained like:
// let file_chooser = page.wait_for_file_chooser(async {
// page.locator("input[type=file]").click().await?;
// Ok(())
// }).await?;Implementations§
Source§impl FileChooser
impl FileChooser
Sourcepub fn is_multiple(&self) -> bool
pub fn is_multiple(&self) -> bool
Check if this file chooser accepts multiple files.
Trait Implementations§
Auto 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