pub struct Page { /* private fields */ }Expand description
A browser page/tab.
Implementations§
Source§impl Page
impl Page
pub fn new(engine: EngineHandle) -> Self
Sourcepub async fn from_html(
html: &str,
_profile: Option<StealthProfile>,
) -> Result<Self, PageError>
pub async fn from_html( html: &str, _profile: Option<StealthProfile>, ) -> Result<Self, PageError>
Create a page from raw HTML (no network).
Sourcepub async fn with_profile(
html: &str,
url: &str,
_profile: StealthProfile,
) -> Result<Self, PageError>
pub async fn with_profile( html: &str, url: &str, _profile: StealthProfile, ) -> Result<Self, PageError>
Create a page with profile and URL (no network).
Sourcepub fn reload_html(&mut self, html: &str, url: &str)
pub fn reload_html(&mut self, html: &str, url: &str)
Reload the page with new HTML (reuses V8 isolate in v8 mode).
Navigate to a URL with challenge-aware retry loop.
Fetch → classify → if challenge detected, retry up to max_iterations.
Uses 15s budget by default.
Navigate with a custom solver list.
Same as navigate() but accepts external challenge solvers.
Warm navigation — reuse existing page state, fetch new URL.
Faster than cold navigate() because it skips profile setup.
pub async fn evaluate_async( &mut self, _script: &str, ) -> Result<Value, PageError>
Sourcepub fn evaluate(&mut self, _script: &str) -> Result<String, PageError>
pub fn evaluate(&mut self, _script: &str) -> Result<String, PageError>
Synchronous evaluate — DOM-level only without v8.
pub async fn title_async(&self) -> Result<String, PageError>
pub async fn text_content(&self) -> Result<String, PageError>
pub async fn text_of(&self, _selector: &str) -> Result<String, PageError>
Sourcepub fn has_element(&self, _selector: &str) -> bool
pub fn has_element(&self, _selector: &str) -> bool
Synchronous element check.
Sourcepub fn challenge_verdict(&self) -> ChallengeVerdict
pub fn challenge_verdict(&self) -> ChallengeVerdict
Challenge classification result.
Sourcepub fn engine_class(&self) -> &EngineClass
pub fn engine_class(&self) -> &EngineClass
Full challenge classification.
pub fn dom(&self) -> &Dom
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Page
impl RefUnwindSafe for Page
impl Send for Page
impl Sync for Page
impl Unpin for Page
impl UnsafeUnpin for Page
impl UnwindSafe for Page
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