pub enum Expectation {
DocumentReady,
All {
conditions: Vec<Expectation>,
},
Enabled {
target: LocatorSpec,
enabled: bool,
},
DownloadStarted,
Focused {
target: LocatorSpec,
},
Url {
value: String,
contains: bool,
},
Visible {
target: LocatorSpec,
},
Hidden {
target: LocatorSpec,
},
Text {
target: LocatorSpec,
value: String,
contains: bool,
},
Value {
target: LocatorSpec,
value: String,
},
Checked {
target: LocatorSpec,
checked: bool,
},
Selected {
target: LocatorSpec,
values: Vec<String>,
},
}Expand description
An observable completion condition. Values are not copied into receipts, and
Debug prints only the kind.
Variants§
DocumentReady
Wait for the document to be interactive or complete, without claiming application readiness.
All
Require every supplied condition in the same observation pass.
Fields
conditions: Vec<Expectation>Conditions that must all hold.
Enabled
Wait for a visible control to become enabled or disabled.
DownloadStarted
Observe a new native download originating from this page.
Focused
Wait for a target to hold focus.
Fields
target: LocatorSpecTarget that must receive focus.
Url
Wait for the page URL.
Fields
Visible
Wait for a rendered target.
Fields
target: LocatorSpecLocator resolved at execution time.
Hidden
Wait for a target to disappear or stop rendering.
Fields
target: LocatorSpecLocator resolved at execution time.
Text
Match element text.
Fields
target: LocatorSpecLocator resolved at execution time.
Value
Wait for a form value.
Fields
target: LocatorSpecLocator resolved at execution time.
Checked
Wait for a checked state.
Selected
Wait for selected option values.
Fields
target: LocatorSpecLocator resolved at execution time.
Implementations§
Trait Implementations§
Source§impl Clone for Expectation
impl Clone for Expectation
Source§fn clone(&self) -> Expectation
fn clone(&self) -> Expectation
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for Expectation
impl Debug for Expectation
Source§impl<'de> Deserialize<'de> for Expectation
impl<'de> Deserialize<'de> for Expectation
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<Expectation, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<Expectation, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
impl Eq for Expectation
Source§impl JsonSchema for Expectation
impl JsonSchema for Expectation
Source§fn schema_id() -> Cow<'static, str>
fn schema_id() -> Cow<'static, str>
Source§fn json_schema(generator: &mut SchemaGenerator) -> Schema
fn json_schema(generator: &mut SchemaGenerator) -> Schema
Source§fn inline_schema() -> bool
fn inline_schema() -> bool
$ref keyword. Read more