pub struct Page { /* private fields */ }Implementations§
Source§impl Page
impl Page
Sourcepub async fn find_element(
self: Arc<Self>,
selector: String,
) -> XcelerateResult<Arc<Element>>
pub async fn find_element( self: Arc<Self>, selector: String, ) -> XcelerateResult<Arc<Element>>
Finds an element matching the CSS selector.
Sourcepub async fn wait_for_selector(
self: Arc<Self>,
selector: String,
) -> XcelerateResult<Arc<Element>>
pub async fn wait_for_selector( self: Arc<Self>, selector: String, ) -> XcelerateResult<Arc<Element>>
Waits for an element matching the selector to appear in the DOM.
Waits for the page to finish loading.
Sourcepub async fn reload(&self) -> XcelerateResult<()>
pub async fn reload(&self) -> XcelerateResult<()>
Reloads the page.
Navigates to a URL.
Sourcepub async fn title(&self) -> XcelerateResult<String>
pub async fn title(&self) -> XcelerateResult<String>
Returns the page title.
Sourcepub async fn content(&self) -> XcelerateResult<String>
pub async fn content(&self) -> XcelerateResult<String>
Returns the full HTML content of the page.
Sourcepub async fn screenshot(&self) -> XcelerateResult<Vec<u8>>
pub async fn screenshot(&self) -> XcelerateResult<Vec<u8>>
Captures a screenshot of the page as a PNG.
Sourcepub async fn screenshot_full(&self) -> XcelerateResult<Vec<u8>>
pub async fn screenshot_full(&self) -> XcelerateResult<Vec<u8>>
Captures a full-page screenshot by overriding device metrics.
Sourcepub async fn pdf(&self) -> XcelerateResult<Vec<u8>>
pub async fn pdf(&self) -> XcelerateResult<Vec<u8>>
Captures a PDF of the page.
Sourcepub async fn add_script_to_evaluate_on_new_document(
&self,
source: String,
) -> XcelerateResult<String>
pub async fn add_script_to_evaluate_on_new_document( &self, source: String, ) -> XcelerateResult<String>
Evaluates a script on every new document.
Sourcepub async fn go_back(&self) -> XcelerateResult<()>
pub async fn go_back(&self) -> XcelerateResult<()>
Navigates back in history.
Trait Implementations§
Source§impl<UT> LowerError<UT> for Page
impl<UT> LowerError<UT> for Page
Source§fn lower_error(obj: Self) -> RustBuffer
fn lower_error(obj: Self) -> RustBuffer
Lower this value for scaffolding function return Read more
Source§impl<UT> LowerReturn<UT> for Page
impl<UT> LowerReturn<UT> for Page
Source§type ReturnType = <Arc<Page> as LowerReturn<UniFfiTag>>::ReturnType
type ReturnType = <Arc<Page> as LowerReturn<UniFfiTag>>::ReturnType
The type that should be returned by scaffolding functions for this type. Read more
Source§fn lower_return(obj: Self) -> Result<Self::ReturnType, RustCallError>
fn lower_return(obj: Self) -> Result<Self::ReturnType, RustCallError>
Lower the return value from an scaffolding call Read more
Source§fn handle_failed_lift(
error: LiftArgsError,
) -> Result<Self::ReturnType, RustCallError>
fn handle_failed_lift( error: LiftArgsError, ) -> Result<Self::ReturnType, RustCallError>
Lower the return value for failed argument lifts Read more
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