pub struct Element { /* private fields */ }
Implementations§
Source§impl Element
impl Element
Sourcepub fn children(&self) -> Vec<Element>
pub fn children(&self) -> Vec<Element>
Examples found in repository?
examples/vscode_click_on_search.rs (line 27)
19fn print_element(element: Element, depth: usize) {
20 let indent = " ".repeat(depth * 2);
21 println!("{indent}{:?} title={} description={} @ {}", element.role(), element.title(), element.description(), element.position());
22
23 if element.role() == Role::RadioButton && element.title().starts_with("Search") {
24 element.click();
25 }
26
27 for child in element.children() {
28 print_element(child, depth + 1);
29 }
30}
Sourcepub fn click(&self)
pub fn click(&self)
Examples found in repository?
examples/vscode_click_on_search.rs (line 24)
19fn print_element(element: Element, depth: usize) {
20 let indent = " ".repeat(depth * 2);
21 println!("{indent}{:?} title={} description={} @ {}", element.role(), element.title(), element.description(), element.position());
22
23 if element.role() == Role::RadioButton && element.title().starts_with("Search") {
24 element.click();
25 }
26
27 for child in element.children() {
28 print_element(child, depth + 1);
29 }
30}
Sourcepub fn description(&self) -> String
pub fn description(&self) -> String
Examples found in repository?
examples/vscode_click_on_search.rs (line 21)
19fn print_element(element: Element, depth: usize) {
20 let indent = " ".repeat(depth * 2);
21 println!("{indent}{:?} title={} description={} @ {}", element.role(), element.title(), element.description(), element.position());
22
23 if element.role() == Role::RadioButton && element.title().starts_with("Search") {
24 element.click();
25 }
26
27 for child in element.children() {
28 print_element(child, depth + 1);
29 }
30}
Sourcepub fn position(&self) -> Position
pub fn position(&self) -> Position
Examples found in repository?
More examples
examples/vscode_click_on_search.rs (line 21)
19fn print_element(element: Element, depth: usize) {
20 let indent = " ".repeat(depth * 2);
21 println!("{indent}{:?} title={} description={} @ {}", element.role(), element.title(), element.description(), element.position());
22
23 if element.role() == Role::RadioButton && element.title().starts_with("Search") {
24 element.click();
25 }
26
27 for child in element.children() {
28 print_element(child, depth + 1);
29 }
30}
pub fn rect(&self) -> Rect
pub fn size(&self) -> Size
pub fn find<P: FnMut(&Element) -> bool>(&self, pred: P) -> Option<Element>
Sourcepub fn role(&self) -> Role
pub fn role(&self) -> Role
Examples found in repository?
examples/vscode_click_on_search.rs (line 21)
19fn print_element(element: Element, depth: usize) {
20 let indent = " ".repeat(depth * 2);
21 println!("{indent}{:?} title={} description={} @ {}", element.role(), element.title(), element.description(), element.position());
22
23 if element.role() == Role::RadioButton && element.title().starts_with("Search") {
24 element.click();
25 }
26
27 for child in element.children() {
28 print_element(child, depth + 1);
29 }
30}
pub fn url(&self) -> String
Sourcepub fn title(&self) -> String
pub fn title(&self) -> String
Examples found in repository?
More examples
examples/vscode_click_on_search.rs (line 21)
19fn print_element(element: Element, depth: usize) {
20 let indent = " ".repeat(depth * 2);
21 println!("{indent}{:?} title={} description={} @ {}", element.role(), element.title(), element.description(), element.position());
22
23 if element.role() == Role::RadioButton && element.title().starts_with("Search") {
24 element.click();
25 }
26
27 for child in element.children() {
28 print_element(child, depth + 1);
29 }
30}
pub fn try_children(&self) -> UIResult<Vec<Element>>
pub fn try_click(&self) -> UIResult<()>
pub fn try_description(&self) -> UIResult<String>
pub fn try_position(&self) -> UIResult<Position>
pub fn try_rect(&self) -> UIResult<Rect>
pub fn try_size(&self) -> UIResult<Size>
pub fn try_role(&self) -> UIResult<Role>
pub fn try_title(&self) -> UIResult<String>
pub fn try_url(&self) -> UIResult<String>
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Element
impl !RefUnwindSafe for Element
impl !Send for Element
impl !Sync for Element
impl Unpin for Element
impl !UnwindSafe for Element
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