Class elmFinder
Finds UI elements (elm). Contains name and other parameters of elements to find.
public class elmFinder
Examples
Find link "Example" in web page, and click. Wait max 5 s. Exception if not found.
var w = wnd.find(0, "* Chrome");
w.Elm["web:LINK", "Example"].Find(5).Invoke();
Find window that contains certain UI element, and get the UI element too.
var f = new elmFinder("BUTTON", "Apply"); //or var f = elm.path["BUTTON", "Apply"];
wnd w = wnd.find(cn: "#32770", also: t => f.In(t).Exists()); //or t => t.HasElm(f)
print.it(w);
print.it(f.Result);
Namespace: Au
Assembly: Au.dll
Constructors
| Name | Description |
|---|---|
| elmFinder(string, string, Strings, EFFlags, Func<elm, bool>, int, string) | Stores the specified UI element properties in this object. |
Properties
| Name | Description |
|---|---|
| this[string, string, Strings, EFFlags, Func<elm, bool>, int, string] | Creates an elmFinder for finding a UI element. Supports path like |
| Next | Gets or sets next finder in path (immediately after this finder). |
| Result | The found UI element.
|
| ResultGetProperty | Set this when you need only some property of the UI element (name, etc) and not the UI element itself.
The value is a character like with elm.GetProperties, for example |
| ResultProperty | The requested property of the found UI element, depending on elmFinder.ResultGetProperty.
|
Methods
| Name | Description |
|---|---|
| Exists() | Finds the first matching descendant UI element in the window or UI element. Like elmFinder.Find, just different return type. |
| Exists(Seconds) | Finds the first matching descendant UI element in the window or UI element. Can wait and throw NotFoundException. Like elmFinder.Find, just different return type. |
| Find() | Finds the first matching descendant UI element in the window or UI element. |
| Find(Seconds) | Finds the first matching descendant UI element in the window or UI element. Can wait and throw NotFoundException. |
| FindAll() | Finds all matching descendant UI elements in the window or UI element. |
| In(elm) | Sets or changes parent UI element where elmFinder.Find etc will search. |
| In(wnd) | Sets or changes window or control where elmFinder.Find etc will search. |
| ToString() | |
| Wait(Seconds) | Waits for a matching descendant UI element to appear in the window or UI element. |