pub struct LocatorHandlerManager { /* private fields */ }Expand description
Manager for locator handlers.
Implementations§
Source§impl LocatorHandlerManager
impl LocatorHandlerManager
Sourcepub async fn add_handler<F, Fut>(
&self,
selector: Selector,
handler: F,
options: LocatorHandlerOptions,
) -> u64
pub async fn add_handler<F, Fut>( &self, selector: Selector, handler: F, options: LocatorHandlerOptions, ) -> u64
Add a locator handler.
The handler will be called when the specified locator matches an element that is blocking an action. Returns the handler ID.
Sourcepub async fn remove_handler_by_id(&self, id: u64)
pub async fn remove_handler_by_id(&self, id: u64)
Remove a locator handler by ID.
Sourcepub async fn try_handle_blocking(&self, page: &Page) -> bool
pub async fn try_handle_blocking(&self, page: &Page) -> bool
Check if any handler matches a blocking element and run it.
Returns true if a handler was run.
Trait Implementations§
Source§impl Debug for LocatorHandlerManager
impl Debug for LocatorHandlerManager
Auto Trait Implementations§
impl !Freeze for LocatorHandlerManager
impl !RefUnwindSafe for LocatorHandlerManager
impl Send for LocatorHandlerManager
impl Sync for LocatorHandlerManager
impl Unpin for LocatorHandlerManager
impl !UnwindSafe for LocatorHandlerManager
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