pub trait EngineAdapter: Send + Sync {
Show 32 methods
// Required methods
fn engine_type(&self) -> EngineType;
fn url<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<String, EngineError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn goto<'life0, 'life1, 'async_trait>(
&'life0 self,
url: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<(), EngineError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn query_selector<'life0, 'life1, 'async_trait>(
&'life0 self,
selector: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<Option<ElementInfo>, EngineError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn query_selector_all<'life0, 'life1, 'async_trait>(
&'life0 self,
selector: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<Vec<ElementInfo>, EngineError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn count<'life0, 'life1, 'async_trait>(
&'life0 self,
selector: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<usize, EngineError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn click<'life0, 'life1, 'async_trait>(
&'life0 self,
selector: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<(), EngineError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn fill<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
selector: &'life1 str,
text: &'life2 str,
) -> Pin<Box<dyn Future<Output = Result<(), EngineError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait;
fn type_text<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
selector: &'life1 str,
text: &'life2 str,
) -> Pin<Box<dyn Future<Output = Result<(), EngineError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait;
fn text_content<'life0, 'life1, 'async_trait>(
&'life0 self,
selector: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<Option<String>, EngineError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn input_value<'life0, 'life1, 'async_trait>(
&'life0 self,
selector: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<Option<String>, EngineError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn get_attribute<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
selector: &'life1 str,
attribute: &'life2 str,
) -> Pin<Box<dyn Future<Output = Result<Option<String>, EngineError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait;
fn is_visible<'life0, 'life1, 'async_trait>(
&'life0 self,
selector: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<bool, EngineError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn is_enabled<'life0, 'life1, 'async_trait>(
&'life0 self,
selector: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<bool, EngineError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn wait_for_selector<'life0, 'life1, 'async_trait>(
&'life0 self,
selector: &'life1 str,
timeout_ms: u64,
) -> Pin<Box<dyn Future<Output = Result<(), EngineError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn scroll_into_view<'life0, 'life1, 'async_trait>(
&'life0 self,
selector: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<(), EngineError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn evaluate<'life0, 'life1, 'async_trait>(
&'life0 self,
script: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<Value, EngineError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn screenshot<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<Vec<u8>, EngineError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn pdf<'life0, 'async_trait>(
&'life0 self,
options: PdfOptions,
) -> Pin<Box<dyn Future<Output = Result<Vec<u8>, EngineError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn bring_to_front<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<(), EngineError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn wait_for_navigation<'life0, 'async_trait>(
&'life0 self,
timeout_ms: u64,
) -> Pin<Box<dyn Future<Output = Result<(), EngineError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn keyboard_press<'life0, 'life1, 'async_trait>(
&'life0 self,
key: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<(), EngineError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn keyboard_type<'life0, 'life1, 'async_trait>(
&'life0 self,
text: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<(), EngineError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn keyboard_down<'life0, 'life1, 'async_trait>(
&'life0 self,
key: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<(), EngineError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn keyboard_up<'life0, 'life1, 'async_trait>(
&'life0 self,
key: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<(), EngineError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
// Provided methods
fn mouse_click<'life0, 'async_trait>(
&'life0 self,
x: f64,
y: f64,
) -> Pin<Box<dyn Future<Output = Result<(), EngineError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait { ... }
fn read_browser_version_page<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<Value, EngineError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait { ... }
fn restore_storage_state<'life0, 'async_trait>(
&'life0 self,
_state: Value,
) -> Pin<Box<dyn Future<Output = Result<(), EngineError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait { ... }
fn export_storage_state<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<Value, EngineError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait { ... }
fn add_init_script<'life0, 'life1, 'async_trait>(
&'life0 self,
_script: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<Option<String>, EngineError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait { ... }
fn remove_init_script<'life0, 'life1, 'async_trait>(
&'life0 self,
_identifier: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<(), EngineError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait { ... }
fn trace_events<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Option<BoxStream<'static, TraceEngineEvent>>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait { ... }
}Expand description
Trait for browser engine adapters.
This trait provides a unified interface for different browser automation engines, allowing the library to work with multiple backends.
Required Methods§
Sourcefn engine_type(&self) -> EngineType
fn engine_type(&self) -> EngineType
Get the engine type.
Sourcefn url<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<String, EngineError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn url<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<String, EngineError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Get the current page URL.
Sourcefn goto<'life0, 'life1, 'async_trait>(
&'life0 self,
url: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<(), EngineError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn goto<'life0, 'life1, 'async_trait>(
&'life0 self,
url: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<(), EngineError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Navigate to a URL.
Sourcefn query_selector<'life0, 'life1, 'async_trait>(
&'life0 self,
selector: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<Option<ElementInfo>, EngineError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn query_selector<'life0, 'life1, 'async_trait>(
&'life0 self,
selector: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<Option<ElementInfo>, EngineError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Query for a single element.
Sourcefn query_selector_all<'life0, 'life1, 'async_trait>(
&'life0 self,
selector: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<Vec<ElementInfo>, EngineError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn query_selector_all<'life0, 'life1, 'async_trait>(
&'life0 self,
selector: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<Vec<ElementInfo>, EngineError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Query for all matching elements.
Sourcefn count<'life0, 'life1, 'async_trait>(
&'life0 self,
selector: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<usize, EngineError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn count<'life0, 'life1, 'async_trait>(
&'life0 self,
selector: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<usize, EngineError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Count matching elements.
Sourcefn click<'life0, 'life1, 'async_trait>(
&'life0 self,
selector: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<(), EngineError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn click<'life0, 'life1, 'async_trait>(
&'life0 self,
selector: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<(), EngineError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Click an element.
Sourcefn fill<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
selector: &'life1 str,
text: &'life2 str,
) -> Pin<Box<dyn Future<Output = Result<(), EngineError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn fill<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
selector: &'life1 str,
text: &'life2 str,
) -> Pin<Box<dyn Future<Output = Result<(), EngineError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Fill an input element with text.
Sourcefn type_text<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
selector: &'life1 str,
text: &'life2 str,
) -> Pin<Box<dyn Future<Output = Result<(), EngineError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn type_text<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
selector: &'life1 str,
text: &'life2 str,
) -> Pin<Box<dyn Future<Output = Result<(), EngineError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Type text into an element (simulating key presses).
Sourcefn text_content<'life0, 'life1, 'async_trait>(
&'life0 self,
selector: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<Option<String>, EngineError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn text_content<'life0, 'life1, 'async_trait>(
&'life0 self,
selector: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<Option<String>, EngineError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Get the text content of an element.
Sourcefn input_value<'life0, 'life1, 'async_trait>(
&'life0 self,
selector: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<Option<String>, EngineError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn input_value<'life0, 'life1, 'async_trait>(
&'life0 self,
selector: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<Option<String>, EngineError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Get the value of an input element.
Sourcefn get_attribute<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
selector: &'life1 str,
attribute: &'life2 str,
) -> Pin<Box<dyn Future<Output = Result<Option<String>, EngineError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn get_attribute<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
selector: &'life1 str,
attribute: &'life2 str,
) -> Pin<Box<dyn Future<Output = Result<Option<String>, EngineError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Get an attribute value from an element.
Sourcefn is_visible<'life0, 'life1, 'async_trait>(
&'life0 self,
selector: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<bool, EngineError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn is_visible<'life0, 'life1, 'async_trait>(
&'life0 self,
selector: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<bool, EngineError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Check if an element is visible.
Sourcefn is_enabled<'life0, 'life1, 'async_trait>(
&'life0 self,
selector: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<bool, EngineError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn is_enabled<'life0, 'life1, 'async_trait>(
&'life0 self,
selector: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<bool, EngineError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Check if an element is enabled.
Sourcefn wait_for_selector<'life0, 'life1, 'async_trait>(
&'life0 self,
selector: &'life1 str,
timeout_ms: u64,
) -> Pin<Box<dyn Future<Output = Result<(), EngineError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn wait_for_selector<'life0, 'life1, 'async_trait>(
&'life0 self,
selector: &'life1 str,
timeout_ms: u64,
) -> Pin<Box<dyn Future<Output = Result<(), EngineError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Wait for a selector to appear.
Sourcefn scroll_into_view<'life0, 'life1, 'async_trait>(
&'life0 self,
selector: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<(), EngineError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn scroll_into_view<'life0, 'life1, 'async_trait>(
&'life0 self,
selector: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<(), EngineError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Scroll an element into view.
Sourcefn evaluate<'life0, 'life1, 'async_trait>(
&'life0 self,
script: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<Value, EngineError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn evaluate<'life0, 'life1, 'async_trait>(
&'life0 self,
script: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<Value, EngineError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Evaluate JavaScript in the page context.
Sourcefn screenshot<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<Vec<u8>, EngineError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn screenshot<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<Vec<u8>, EngineError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Take a screenshot.
Sourcefn pdf<'life0, 'async_trait>(
&'life0 self,
options: PdfOptions,
) -> Pin<Box<dyn Future<Output = Result<Vec<u8>, EngineError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn pdf<'life0, 'async_trait>(
&'life0 self,
options: PdfOptions,
) -> Pin<Box<dyn Future<Output = Result<Vec<u8>, EngineError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Generate a PDF of the current page.
Only supported by Chromium-based engines (chromiumoxide). Returns an error for engines that do not support PDF generation.
Sourcefn bring_to_front<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<(), EngineError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn bring_to_front<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<(), EngineError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Bring the page to front.
Wait for navigation to complete.
Sourcefn keyboard_press<'life0, 'life1, 'async_trait>(
&'life0 self,
key: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<(), EngineError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn keyboard_press<'life0, 'life1, 'async_trait>(
&'life0 self,
key: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<(), EngineError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Press a key at the page level (e.g. “Escape”, “Enter”, “Tab”).
Key names follow the Playwright/Puppeteer convention.
Sourcefn keyboard_type<'life0, 'life1, 'async_trait>(
&'life0 self,
text: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<(), EngineError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn keyboard_type<'life0, 'life1, 'async_trait>(
&'life0 self,
text: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<(), EngineError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Type text at the page level (dispatches key events for each character).
Sourcefn keyboard_down<'life0, 'life1, 'async_trait>(
&'life0 self,
key: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<(), EngineError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn keyboard_down<'life0, 'life1, 'async_trait>(
&'life0 self,
key: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<(), EngineError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Hold a key down at the page level. Must be paired with keyboard_up.
Sourcefn keyboard_up<'life0, 'life1, 'async_trait>(
&'life0 self,
key: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<(), EngineError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn keyboard_up<'life0, 'life1, 'async_trait>(
&'life0 self,
key: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<(), EngineError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Release a held key at the page level.
Provided Methods§
Sourcefn mouse_click<'life0, 'async_trait>(
&'life0 self,
x: f64,
y: f64,
) -> Pin<Box<dyn Future<Output = Result<(), EngineError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn mouse_click<'life0, 'async_trait>(
&'life0 self,
x: f64,
y: f64,
) -> Pin<Box<dyn Future<Output = Result<(), EngineError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Click at viewport coordinates, without scrolling anything into view.
This is what ClickScroll::None needs: the engine’s element click
scrolls the target into view first, so it cannot honor a “do not scroll”
request. The default implementation reports that the engine has no such
API, so the constraint is refused rather than silently ignored.
§Arguments
x- Viewport x coordinatey- Viewport y coordinate
§Returns
Nothing on success, or EngineError::Browser when unsupported.
Sourcefn read_browser_version_page<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<Value, EngineError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn read_browser_version_page<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<Value, EngineError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Read chrome://version in a fresh tab without changing the current page.
Sourcefn restore_storage_state<'life0, 'async_trait>(
&'life0 self,
_state: Value,
) -> Pin<Box<dyn Future<Output = Result<(), EngineError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn restore_storage_state<'life0, 'async_trait>(
&'life0 self,
_state: Value,
) -> Pin<Box<dyn Future<Output = Result<(), EngineError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Restore portable cookies and origin-scoped localStorage before navigation.
Sourcefn export_storage_state<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<Value, EngineError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn export_storage_state<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<Value, EngineError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Export portable cookies and the current page’s localStorage.
Sourcefn add_init_script<'life0, 'life1, 'async_trait>(
&'life0 self,
_script: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<Option<String>, EngineError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn add_init_script<'life0, 'life1, 'async_trait>(
&'life0 self,
_script: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<Option<String>, EngineError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Run script in every document the page loads from now on; an
identifier for EngineAdapter::remove_init_script, or None when the
engine cannot (the default).
Sourcefn remove_init_script<'life0, 'life1, 'async_trait>(
&'life0 self,
_identifier: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<(), EngineError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn remove_init_script<'life0, 'life1, 'async_trait>(
&'life0 self,
_identifier: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<(), EngineError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Stop running a script added with EngineAdapter::add_init_script.
Sourcefn trace_events<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Option<BoxStream<'static, TraceEngineEvent>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn trace_events<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Option<BoxStream<'static, TraceEngineEvent>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
A stream of page activity for a trace recorder, or None when the
engine does not report any (the default).
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".