Skip to main content

Session

Struct Session 

Source
pub struct Session { /* private fields */ }

Implementations§

Source§

impl Session

Source

pub async fn launch() -> Result<Self>

Source

pub async fn launch_with_config(stealth: StealthConfig) -> Result<Self>

Source

pub fn set_observe_config(&mut self, config: ObserveConfig)

Source

pub fn page(&self) -> &Page

Source

pub fn browser(&self) -> &Browser

Source

pub async fn ax_snapshot(&self, include_all: bool) -> Result<SnapshotResult>

Source

pub async fn observe(&mut self) -> Result<&[InteractiveElement]>

Source

pub async fn screenshot(&mut self) -> Result<Vec<u8>>

Source

pub fn element_list(&self) -> String

Source

pub fn get(&self, index: usize) -> Option<&InteractiveElement>

Source

pub fn elements(&self) -> &[InteractiveElement]

Source

pub fn len(&self) -> usize

Source

pub fn is_empty(&self) -> bool

Source

pub fn find_by_text(&self, needle: &str) -> Option<usize>

Source

pub fn find_all_by_text(&self, needle: &str) -> Vec<usize>

Source

pub async fn observe_diff(&mut self) -> Result<ObserveDiff>

Source

pub fn added_element_list(&self, diff: &ObserveDiff) -> String

Source

pub async fn screenshot_plain(&self) -> Result<Vec<u8>>

Source

pub async fn click(&mut self, index: usize) -> Result<()>

Source

pub async fn fill(&mut self, index: usize, text: &str) -> Result<()>

Source

pub async fn select(&mut self, index: usize, value: &str) -> Result<()>

Source

pub async fn hover(&mut self, index: usize) -> Result<()>

Source

pub async fn scroll_to(&mut self, index: usize) -> Result<()>

Source

pub async fn try_click(&mut self, index: usize) -> Result<bool>

Source

pub async fn human_click(&mut self, index: usize) -> Result<()>

Source

pub async fn human_fill(&mut self, index: usize, text: &str) -> Result<()>

Source

pub async fn focus(&mut self, index: usize) -> Result<()>

Source

pub async fn submit(&mut self, index: usize) -> Result<()>

Source

pub async fn options(&mut self, index: usize) -> Result<Vec<(String, String)>>

Source

pub async fn goto(&mut self, url: &str) -> Result<()>

Source

pub async fn back(&mut self) -> Result<()>

Source

pub async fn forward(&mut self) -> Result<()>

Source

pub async fn reload(&mut self) -> Result<()>

Source

pub async fn url(&self) -> Result<String>

Source

pub async fn title(&self) -> Result<String>

Source

pub async fn text(&self) -> Result<String>

Source

pub async fn scroll_down(&self) -> Result<()>

Source

pub async fn scroll_up(&self) -> Result<()>

Source

pub async fn scroll_to_top(&self) -> Result<()>

Source

pub async fn scroll_to_bottom(&self) -> Result<()>

Source

pub async fn wait_for_stable(&self) -> Result<()>

Source

pub async fn wait(&self, ms: u64)

Source

pub async fn wait_for_text(&self, text: &str, timeout_ms: u64) -> Result<()>

Source

pub async fn wait_for_url(&self, pattern: &str, timeout_ms: u64) -> Result<()>

Source

pub async fn wait_for_idle(&self, timeout_ms: u64) -> Result<()>

Source

pub async fn press_key(&self, key: &str) -> Result<()>

Source

pub async fn eval<T: DeserializeOwned>(&self, js: &str) -> Result<T>

Source

pub async fn exec(&self, js: &str) -> Result<()>

Source

pub async fn extract<T: DeserializeOwned>( &self, js_expression: &str, ) -> Result<T>

Source

pub async fn spa_info(&self) -> Result<SpaRouterInfo>

Source

pub async fn spa_navigate(&mut self, path: &str) -> Result<String>

Source

pub async fn history_go(&mut self, delta: i32) -> Result<()>

Source

pub async fn close(self) -> Result<()>

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> PolicyExt for T
where T: ?Sized,

Source§

fn and<P, B, E>(self, other: P) -> And<T, P>
where T: Sized + Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns Action::Follow only if self and other return Action::Follow. Read more
Source§

fn or<P, B, E>(self, other: P) -> Or<T, P>
where T: Sized + Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns Action::Follow if either self or other returns Action::Follow. Read more
Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more