thirtyfour/components/wrapper/
mod.rs

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
mod resolver;

use crate::WebElement;

pub use resolver::*;

#[cfg(feature = "component")]
pub use thirtyfour_macros::Component;

/// The `Component` trait is automatically implemented by the `Component` derive macro.
///
/// Anything that implements `Component + Clone + From<WebElement>` can be used with
/// ElementResolver to take the resolved element as input, and return the specific type.
///
/// There is also an implementation of ElementResolver for a Vec containing such types.
pub trait Component: Sized + From<WebElement> {
    fn base_element(&self) -> WebElement;
}