pub struct ElementHandle { /* private fields */ }Expand description
A handle to a resolved element.
Implementations§
Source§impl ElementHandle
impl ElementHandle
pub async fn click(&self, options: Option<ClickOptions>) -> Result<()>
pub async fn fill(&self, text: &str, _opts: Option<FillOptions>) -> Result<()>
pub async fn focus(&self) -> Result<()>
pub async fn blur(&self) -> Result<()>
pub async fn scroll_into_view_if_needed(&self) -> Result<()>
pub async fn dispatch_event( &self, type_: &str, init: Option<Value>, ) -> Result<()>
pub async fn text_content(&self) -> Result<Option<String>>
pub async fn inner_text(&self) -> Result<String>
pub async fn inner_html(&self) -> Result<String>
pub async fn get_attribute(&self, name: &str) -> Result<Option<String>>
Sourcepub async fn evaluate<R: DeserializeOwned>(
&self,
expression: &str,
arg: Option<Value>,
) -> Result<R>
pub async fn evaluate<R: DeserializeOwned>( &self, expression: &str, arg: Option<Value>, ) -> Result<R>
Evaluate expression with this element bound as the first argument.
pub async fn is_visible(&self) -> Result<bool>
pub async fn is_enabled(&self) -> Result<bool>
pub async fn is_checked(&self) -> Result<bool>
pub async fn is_editable(&self) -> Result<bool>
pub async fn bounding_box(&self) -> Result<Option<BoundingBox>>
pub async fn screenshot( &self, opts: Option<ScreenshotOptions>, ) -> Result<Vec<u8>>
Sourcepub async fn set_input_files(&self, files: &[&str]) -> Result<()>
pub async fn set_input_files(&self, files: &[&str]) -> Result<()>
Set files on an <input type=file> by server-side path(s).
Trait Implementations§
Source§impl Clone for ElementHandle
impl Clone for ElementHandle
Source§fn clone(&self) -> ElementHandle
fn clone(&self) -> ElementHandle
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl !RefUnwindSafe for ElementHandle
impl !UnwindSafe for ElementHandle
impl Freeze for ElementHandle
impl Send for ElementHandle
impl Sync for ElementHandle
impl Unpin for ElementHandle
impl UnsafeUnpin for ElementHandle
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