pub struct HealingRequest {
pub failed_selector: String,
pub action_type: String,
pub html_context: String,
pub error: String,
pub element_description: Option<String>,
pub previous_attempts: Vec<String>,
pub page_url: Option<String>,
pub page_title: Option<String>,
}Expand description
A request to heal a failed selector.
Fields§
§failed_selector: StringThe selector that failed.
action_type: StringThe type of action that was attempted.
html_context: StringHTML context around the expected element location.
error: StringError message from the failure.
element_description: Option<String>What the element should look like/do.
previous_attempts: Vec<String>Previous selectors that were tried and failed.
page_url: Option<String>Current page URL.
page_title: Option<String>Current page title.
Implementations§
Source§impl HealingRequest
impl HealingRequest
Sourcepub fn new(
failed_selector: impl Into<String>,
action_type: impl Into<String>,
html_context: impl Into<String>,
error: impl Into<String>,
) -> HealingRequest
pub fn new( failed_selector: impl Into<String>, action_type: impl Into<String>, html_context: impl Into<String>, error: impl Into<String>, ) -> HealingRequest
Create a new healing request.
Sourcepub fn with_description(self, desc: impl Into<String>) -> HealingRequest
pub fn with_description(self, desc: impl Into<String>) -> HealingRequest
Add element description.
Sourcepub fn with_previous_attempts(self, attempts: Vec<String>) -> HealingRequest
pub fn with_previous_attempts(self, attempts: Vec<String>) -> HealingRequest
Add previous failed attempts.
Sourcepub fn with_page_context(
self,
url: impl Into<String>,
title: impl Into<String>,
) -> HealingRequest
pub fn with_page_context( self, url: impl Into<String>, title: impl Into<String>, ) -> HealingRequest
Add page context.
Trait Implementations§
Source§impl Clone for HealingRequest
impl Clone for HealingRequest
Source§fn clone(&self) -> HealingRequest
fn clone(&self) -> HealingRequest
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for HealingRequest
impl Debug for HealingRequest
Source§impl<'de> Deserialize<'de> for HealingRequest
impl<'de> Deserialize<'de> for HealingRequest
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<HealingRequest, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<HealingRequest, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl Serialize for HealingRequest
impl Serialize for HealingRequest
Source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
Serialize this value into the given Serde serializer. Read more
Auto Trait Implementations§
impl Freeze for HealingRequest
impl RefUnwindSafe for HealingRequest
impl Send for HealingRequest
impl Sync for HealingRequest
impl Unpin for HealingRequest
impl UnwindSafe for HealingRequest
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