pub struct Element { /* private fields */ }Expand description
Represents an HTML element in the DOM.
Implementations§
Source§impl Element
impl Element
Sourcepub async fn click(self: Arc<Self>) -> XcelerateResult<Arc<Self>>
pub async fn click(self: Arc<Self>) -> XcelerateResult<Arc<Self>>
Clicks the element.
pub async fn type_text( self: Arc<Self>, text: String, ) -> XcelerateResult<Arc<Self>>
Sourcepub async fn hover(self: Arc<Self>) -> XcelerateResult<Arc<Self>>
pub async fn hover(self: Arc<Self>) -> XcelerateResult<Arc<Self>>
Hovers over the element.
Sourcepub async fn focus(self: Arc<Self>) -> XcelerateResult<Arc<Self>>
pub async fn focus(self: Arc<Self>) -> XcelerateResult<Arc<Self>>
Focuses the element.
Sourcepub async fn text(&self) -> XcelerateResult<String>
pub async fn text(&self) -> XcelerateResult<String>
Returns the visible text of the element.
Sourcepub async fn attribute(&self, name: String) -> XcelerateResult<Option<String>>
pub async fn attribute(&self, name: String) -> XcelerateResult<Option<String>>
Returns the value of a specific attribute.
Sourcepub async fn inner_html(&self) -> XcelerateResult<String>
pub async fn inner_html(&self) -> XcelerateResult<String>
Returns the inner HTML of the element.
Trait Implementations§
Source§impl<UT> LowerError<UT> for Element
impl<UT> LowerError<UT> for Element
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 Element
impl<UT> LowerReturn<UT> for Element
Source§type ReturnType = <Arc<Element> as LowerReturn<UniFfiTag>>::ReturnType
type ReturnType = <Arc<Element> 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 Element
impl !RefUnwindSafe for Element
impl Send for Element
impl Sync for Element
impl Unpin for Element
impl UnsafeUnpin for Element
impl !UnwindSafe for Element
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