pub struct ElementHandle { /* private fields */ }Expand description
Channel for the ElementHandle interface (handles.yml).
Implementations§
Source§impl ElementHandle
impl ElementHandle
Sourcepub async fn dispose(&self) -> Result<(), ProtocolError>
pub async fn dispose(&self) -> Result<(), ProtocolError>
JSHandle.dispose (internal).
Sourcepub async fn evaluate_expression(
&self,
params: JSHandleEvaluateExpressionParams,
) -> Result<JSHandleEvaluateExpressionResult, ProtocolError>
pub async fn evaluate_expression( &self, params: JSHandleEvaluateExpressionParams, ) -> Result<JSHandleEvaluateExpressionResult, ProtocolError>
JSHandle.evaluateExpression (“Evaluate”).
Sourcepub async fn evaluate_expression_handle(
&self,
params: JSHandleEvaluateExpressionHandleParams,
) -> Result<JSHandleEvaluateExpressionHandleResult, ProtocolError>
pub async fn evaluate_expression_handle( &self, params: JSHandleEvaluateExpressionHandleParams, ) -> Result<JSHandleEvaluateExpressionHandleResult, ProtocolError>
JSHandle.evaluateExpressionHandle (“Evaluate”).
Sourcepub async fn get_property_list(
&self,
) -> Result<JSHandleGetPropertyListResult, ProtocolError>
pub async fn get_property_list( &self, ) -> Result<JSHandleGetPropertyListResult, ProtocolError>
JSHandle.getPropertyList (“Get property list”).
Sourcepub async fn get_property(
&self,
params: JSHandleGetPropertyParams,
) -> Result<JSHandleGetPropertyResult, ProtocolError>
pub async fn get_property( &self, params: JSHandleGetPropertyParams, ) -> Result<JSHandleGetPropertyResult, ProtocolError>
JSHandle.getProperty (“Get JS property”).
Sourcepub async fn json_value(&self) -> Result<JSHandleJsonValueResult, ProtocolError>
pub async fn json_value(&self) -> Result<JSHandleJsonValueResult, ProtocolError>
JSHandle.jsonValue (“Get JSON value”).
Sourcepub async fn eval_on_selector(
&self,
params: ElementHandleEvalOnSelectorParams,
) -> Result<ElementHandleEvalOnSelectorResult, ProtocolError>
pub async fn eval_on_selector( &self, params: ElementHandleEvalOnSelectorParams, ) -> Result<ElementHandleEvalOnSelectorResult, ProtocolError>
ElementHandle.evalOnSelector (“Evaluate”).
Sourcepub async fn eval_on_selector_all(
&self,
params: ElementHandleEvalOnSelectorAllParams,
) -> Result<ElementHandleEvalOnSelectorAllResult, ProtocolError>
pub async fn eval_on_selector_all( &self, params: ElementHandleEvalOnSelectorAllParams, ) -> Result<ElementHandleEvalOnSelectorAllResult, ProtocolError>
ElementHandle.evalOnSelectorAll (“Evaluate”).
Sourcepub async fn bounding_box(
&self,
) -> Result<ElementHandleBoundingBoxResult, ProtocolError>
pub async fn bounding_box( &self, ) -> Result<ElementHandleBoundingBoxResult, ProtocolError>
ElementHandle.boundingBox (“Get bounding box”).
Sourcepub async fn check(
&self,
params: ElementHandleCheckParams,
) -> Result<(), ProtocolError>
pub async fn check( &self, params: ElementHandleCheckParams, ) -> Result<(), ProtocolError>
ElementHandle.check (“Check”).
Sourcepub async fn click(
&self,
params: ElementHandleClickParams,
) -> Result<(), ProtocolError>
pub async fn click( &self, params: ElementHandleClickParams, ) -> Result<(), ProtocolError>
ElementHandle.click (“Click”).
Sourcepub async fn content_frame(
&self,
) -> Result<ElementHandleContentFrameResult, ProtocolError>
pub async fn content_frame( &self, ) -> Result<ElementHandleContentFrameResult, ProtocolError>
ElementHandle.contentFrame (“Get content frame”).
Sourcepub async fn dblclick(
&self,
params: ElementHandleDblclickParams,
) -> Result<(), ProtocolError>
pub async fn dblclick( &self, params: ElementHandleDblclickParams, ) -> Result<(), ProtocolError>
ElementHandle.dblclick (“Double click”).
Sourcepub async fn dispatch_event(
&self,
params: ElementHandleDispatchEventParams,
) -> Result<(), ProtocolError>
pub async fn dispatch_event( &self, params: ElementHandleDispatchEventParams, ) -> Result<(), ProtocolError>
ElementHandle.dispatchEvent (“Dispatch event”).
Sourcepub async fn fill(
&self,
params: ElementHandleFillParams,
) -> Result<(), ProtocolError>
pub async fn fill( &self, params: ElementHandleFillParams, ) -> Result<(), ProtocolError>
ElementHandle.fill (“Fill “{value}”“).
Sourcepub async fn focus(&self) -> Result<(), ProtocolError>
pub async fn focus(&self) -> Result<(), ProtocolError>
ElementHandle.focus (“Focus”).
Sourcepub async fn get_attribute(
&self,
params: ElementHandleGetAttributeParams,
) -> Result<ElementHandleGetAttributeResult, ProtocolError>
pub async fn get_attribute( &self, params: ElementHandleGetAttributeParams, ) -> Result<ElementHandleGetAttributeResult, ProtocolError>
ElementHandle.getAttribute (“Get attribute”).
Sourcepub async fn hover(
&self,
params: ElementHandleHoverParams,
) -> Result<(), ProtocolError>
pub async fn hover( &self, params: ElementHandleHoverParams, ) -> Result<(), ProtocolError>
ElementHandle.hover (“Hover”).
Sourcepub async fn inner_html(
&self,
) -> Result<ElementHandleInnerHTMLResult, ProtocolError>
pub async fn inner_html( &self, ) -> Result<ElementHandleInnerHTMLResult, ProtocolError>
ElementHandle.innerHTML (“Get HTML”).
Sourcepub async fn inner_text(
&self,
) -> Result<ElementHandleInnerTextResult, ProtocolError>
pub async fn inner_text( &self, ) -> Result<ElementHandleInnerTextResult, ProtocolError>
ElementHandle.innerText (“Get inner text”).
Sourcepub async fn input_value(
&self,
) -> Result<ElementHandleInputValueResult, ProtocolError>
pub async fn input_value( &self, ) -> Result<ElementHandleInputValueResult, ProtocolError>
ElementHandle.inputValue (“Get input value”).
Sourcepub async fn is_checked(
&self,
) -> Result<ElementHandleIsCheckedResult, ProtocolError>
pub async fn is_checked( &self, ) -> Result<ElementHandleIsCheckedResult, ProtocolError>
ElementHandle.isChecked (“Is checked”).
Sourcepub async fn is_disabled(
&self,
) -> Result<ElementHandleIsDisabledResult, ProtocolError>
pub async fn is_disabled( &self, ) -> Result<ElementHandleIsDisabledResult, ProtocolError>
ElementHandle.isDisabled (“Is disabled”).
Sourcepub async fn is_editable(
&self,
) -> Result<ElementHandleIsEditableResult, ProtocolError>
pub async fn is_editable( &self, ) -> Result<ElementHandleIsEditableResult, ProtocolError>
ElementHandle.isEditable (“Is editable”).
Sourcepub async fn is_enabled(
&self,
) -> Result<ElementHandleIsEnabledResult, ProtocolError>
pub async fn is_enabled( &self, ) -> Result<ElementHandleIsEnabledResult, ProtocolError>
ElementHandle.isEnabled (“Is enabled”).
ElementHandle.isHidden (“Is hidden”).
Sourcepub async fn is_visible(
&self,
) -> Result<ElementHandleIsVisibleResult, ProtocolError>
pub async fn is_visible( &self, ) -> Result<ElementHandleIsVisibleResult, ProtocolError>
ElementHandle.isVisible (“Is visible”).
Sourcepub async fn owner_frame(
&self,
) -> Result<ElementHandleOwnerFrameResult, ProtocolError>
pub async fn owner_frame( &self, ) -> Result<ElementHandleOwnerFrameResult, ProtocolError>
ElementHandle.ownerFrame (“Get owner frame”).
Sourcepub async fn press(
&self,
params: ElementHandlePressParams,
) -> Result<(), ProtocolError>
pub async fn press( &self, params: ElementHandlePressParams, ) -> Result<(), ProtocolError>
ElementHandle.press (“Press “{key}”“).
Sourcepub async fn query_selector(
&self,
params: ElementHandleQuerySelectorParams,
) -> Result<ElementHandleQuerySelectorResult, ProtocolError>
pub async fn query_selector( &self, params: ElementHandleQuerySelectorParams, ) -> Result<ElementHandleQuerySelectorResult, ProtocolError>
ElementHandle.querySelector (“Query selector”).
Sourcepub async fn query_selector_all(
&self,
params: ElementHandleQuerySelectorAllParams,
) -> Result<ElementHandleQuerySelectorAllResult, ProtocolError>
pub async fn query_selector_all( &self, params: ElementHandleQuerySelectorAllParams, ) -> Result<ElementHandleQuerySelectorAllResult, ProtocolError>
ElementHandle.querySelectorAll (“Query selector all”).
Sourcepub async fn screenshot(
&self,
params: ElementHandleScreenshotParams,
) -> Result<ElementHandleScreenshotResult, ProtocolError>
pub async fn screenshot( &self, params: ElementHandleScreenshotParams, ) -> Result<ElementHandleScreenshotResult, ProtocolError>
ElementHandle.screenshot (“Screenshot”).
Sourcepub async fn scroll_into_view_if_needed(&self) -> Result<(), ProtocolError>
pub async fn scroll_into_view_if_needed(&self) -> Result<(), ProtocolError>
ElementHandle.scrollIntoViewIfNeeded (“Scroll into view”).
Sourcepub async fn select_option(
&self,
params: ElementHandleSelectOptionParams,
) -> Result<ElementHandleSelectOptionResult, ProtocolError>
pub async fn select_option( &self, params: ElementHandleSelectOptionParams, ) -> Result<ElementHandleSelectOptionResult, ProtocolError>
ElementHandle.selectOption (“Select option”).
Sourcepub async fn select_text(
&self,
params: ElementHandleSelectTextParams,
) -> Result<(), ProtocolError>
pub async fn select_text( &self, params: ElementHandleSelectTextParams, ) -> Result<(), ProtocolError>
ElementHandle.selectText (“Select text”).
Sourcepub async fn set_input_files(
&self,
params: ElementHandleSetInputFilesParams,
) -> Result<(), ProtocolError>
pub async fn set_input_files( &self, params: ElementHandleSetInputFilesParams, ) -> Result<(), ProtocolError>
ElementHandle.setInputFiles (“Set input files”).
Sourcepub async fn tap(
&self,
params: ElementHandleTapParams,
) -> Result<(), ProtocolError>
pub async fn tap( &self, params: ElementHandleTapParams, ) -> Result<(), ProtocolError>
ElementHandle.tap (“Tap”).
Sourcepub async fn text_content(
&self,
) -> Result<ElementHandleTextContentResult, ProtocolError>
pub async fn text_content( &self, ) -> Result<ElementHandleTextContentResult, ProtocolError>
ElementHandle.textContent (“Get text content”).
Sourcepub async fn type(
&self,
params: ElementHandleTypeParams,
) -> Result<(), ProtocolError>
pub async fn type( &self, params: ElementHandleTypeParams, ) -> Result<(), ProtocolError>
ElementHandle.type (“Type”).
Sourcepub async fn uncheck(
&self,
params: ElementHandleUncheckParams,
) -> Result<(), ProtocolError>
pub async fn uncheck( &self, params: ElementHandleUncheckParams, ) -> Result<(), ProtocolError>
ElementHandle.uncheck (“Uncheck”).
Sourcepub async fn wait_for_element_state(
&self,
params: ElementHandleWaitForElementStateParams,
) -> Result<(), ProtocolError>
pub async fn wait_for_element_state( &self, params: ElementHandleWaitForElementStateParams, ) -> Result<(), ProtocolError>
ElementHandle.waitForElementState (“Wait for state”).
Sourcepub async fn wait_for_selector(
&self,
params: ElementHandleWaitForSelectorParams,
) -> Result<ElementHandleWaitForSelectorResult, ProtocolError>
pub async fn wait_for_selector( &self, params: ElementHandleWaitForSelectorParams, ) -> Result<ElementHandleWaitForSelectorResult, ProtocolError>
ElementHandle.waitForSelector (“Wait for selector”).
Trait Implementations§
Source§impl ChannelType for ElementHandle
impl ChannelType for ElementHandle
Source§type Initializer = ElementHandleInitializer
type Initializer = ElementHandleInitializer
__create__.Source§type Event = ElementHandleEvent
type Event = ElementHandleEvent
Source§fn accepts(interface: &str) -> bool
fn accepts(interface: &str) -> bool
interface can be used as this type (an
ElementHandle is also a JSHandle).Source§fn from_channel(channel: Channel) -> Self
fn from_channel(channel: Channel) -> Self
Source§fn initializer(&self) -> Result<Self::Initializer, ProtocolError>
fn initializer(&self) -> Result<Self::Initializer, ProtocolError>
Source§fn events(&self) -> EventStream<Self::Event>
fn events(&self) -> EventStream<Self::Event>
Source§impl Clone for ElementHandle
impl Clone for ElementHandle
Auto 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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.Source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.Source§impl<T> DowncastSync for T
impl<T> DowncastSync for T
impl<T> ErasedDestructor for Twhere
T: 'static,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more