pub struct Session { /* private fields */ }Implementations§
Source§impl Session
impl Session
pub async fn launch() -> Result<Self>
pub async fn launch_with_config(stealth: StealthConfig) -> Result<Self>
pub fn set_observe_config(&mut self, config: ObserveConfig)
pub fn page(&self) -> &Page
pub fn browser(&self) -> &Browser
pub async fn ax_snapshot(&self, include_all: bool) -> Result<SnapshotResult>
pub async fn observe(&mut self) -> Result<&[InteractiveElement]>
pub async fn screenshot(&mut self) -> Result<Vec<u8>>
pub fn element_list(&self) -> String
pub fn get(&self, index: usize) -> Option<&InteractiveElement>
pub fn elements(&self) -> &[InteractiveElement]
pub fn len(&self) -> usize
pub fn is_empty(&self) -> bool
pub fn find_by_text(&self, needle: &str) -> Option<usize>
pub fn find_all_by_text(&self, needle: &str) -> Vec<usize>
pub async fn observe_diff(&mut self) -> Result<ObserveDiff>
pub fn added_element_list(&self, diff: &ObserveDiff) -> String
pub async fn screenshot_plain(&self) -> Result<Vec<u8>>
pub async fn click(&mut self, index: usize) -> Result<()>
pub async fn fill(&mut self, index: usize, text: &str) -> Result<()>
pub async fn select(&mut self, index: usize, value: &str) -> Result<()>
pub async fn hover(&mut self, index: usize) -> Result<()>
pub async fn scroll_to(&mut self, index: usize) -> Result<()>
pub async fn try_click(&mut self, index: usize) -> Result<bool>
pub async fn human_click(&mut self, index: usize) -> Result<()>
pub async fn human_fill(&mut self, index: usize, text: &str) -> Result<()>
pub async fn focus(&mut self, index: usize) -> Result<()>
pub async fn submit(&mut self, index: usize) -> Result<()>
pub async fn options(&mut self, index: usize) -> Result<Vec<(String, String)>>
pub async fn goto(&mut self, url: &str) -> Result<()>
pub async fn back(&mut self) -> Result<()>
pub async fn forward(&mut self) -> Result<()>
pub async fn reload(&mut self) -> Result<()>
pub async fn url(&self) -> Result<String>
pub async fn title(&self) -> Result<String>
pub async fn text(&self) -> Result<String>
pub async fn scroll_down(&self) -> Result<()>
pub async fn scroll_up(&self) -> Result<()>
pub async fn scroll_to_top(&self) -> Result<()>
pub async fn scroll_to_bottom(&self) -> Result<()>
pub async fn wait_for_stable(&self) -> Result<()>
pub async fn wait(&self, ms: u64)
pub async fn wait_for_text(&self, text: &str, timeout_ms: u64) -> Result<()>
pub async fn wait_for_url(&self, pattern: &str, timeout_ms: u64) -> Result<()>
pub async fn wait_for_idle(&self, timeout_ms: u64) -> Result<()>
pub async fn press_key(&self, key: &str) -> Result<()>
pub async fn mouse_down( &self, x: f64, y: f64, button: MouseButton, ) -> Result<()>
pub async fn mouse_move(&self, x: f64, y: f64) -> Result<()>
pub async fn mouse_up(&self, x: f64, y: f64, button: MouseButton) -> Result<()>
pub async fn key_down(&self, key: &str) -> Result<()>
pub async fn key_up(&self, key: &str) -> Result<()>
pub async fn release_all_inputs(&self) -> Result<()>
pub async fn eval<T: DeserializeOwned>(&self, js: &str) -> Result<T>
pub async fn exec(&self, js: &str) -> Result<()>
pub async fn extract<T: DeserializeOwned>( &self, js_expression: &str, ) -> Result<T>
pub async fn spa_info(&self) -> Result<SpaRouterInfo>
pub async fn history_go(&mut self, delta: i32) -> Result<()>
pub async fn close(self) -> Result<()>
Auto Trait Implementations§
impl !RefUnwindSafe for Session
impl !UnwindSafe for Session
impl Freeze for Session
impl Send for Session
impl Sync for Session
impl Unpin for Session
impl UnsafeUnpin for Session
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