pub enum ExpectAssertion {
Show 16 variants
HasText {
locator: Locator,
expected: String,
},
IsVisible {
locator: Locator,
},
IsHidden {
locator: Locator,
},
HasCount {
locator: Locator,
expected: usize,
},
ContainsText {
locator: Locator,
expected: String,
},
IsEnabled {
locator: Locator,
},
IsDisabled {
locator: Locator,
},
IsChecked {
locator: Locator,
},
IsEditable {
locator: Locator,
},
IsFocused {
locator: Locator,
},
IsEmpty {
locator: Locator,
},
HasValue {
locator: Locator,
expected: String,
},
HasCss {
locator: Locator,
property: String,
expected: String,
},
HasClass {
locator: Locator,
expected: String,
},
HasId {
locator: Locator,
expected: String,
},
HasAttribute {
locator: Locator,
name: String,
expected: String,
},
}Expand description
Assertion types for expect()
Variants§
HasText
Element has exact text
IsVisible
Element is visible
IsHidden
Element is hidden
HasCount
Element count matches
ContainsText
Element contains text
IsEnabled
Element is enabled
IsDisabled
Element is disabled
IsChecked
Element is checked
IsEditable
Element is editable
IsFocused
Element is focused
IsEmpty
Element is empty
HasValue
Element has specific value
HasCss
Element has specific CSS property
Fields
HasClass
Element has specific class
HasId
Element has specific ID
HasAttribute
Element has specific attribute
Implementations§
Source§impl ExpectAssertion
impl ExpectAssertion
Sourcepub fn validate(&self, actual: &str) -> ProbarResult<()>
pub fn validate(&self, actual: &str) -> ProbarResult<()>
Sourcepub fn validate_count(&self, actual: usize) -> ProbarResult<()>
pub fn validate_count(&self, actual: usize) -> ProbarResult<()>
Sourcepub fn validate_state(&self, actual: bool) -> ProbarResult<()>
pub fn validate_state(&self, actual: bool) -> ProbarResult<()>
Trait Implementations§
Source§impl Clone for ExpectAssertion
impl Clone for ExpectAssertion
Source§fn clone(&self) -> ExpectAssertion
fn clone(&self) -> ExpectAssertion
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 moreAuto Trait Implementations§
impl Freeze for ExpectAssertion
impl RefUnwindSafe for ExpectAssertion
impl Send for ExpectAssertion
impl Sync for ExpectAssertion
impl Unpin for ExpectAssertion
impl UnsafeUnpin for ExpectAssertion
impl UnwindSafe for ExpectAssertion
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