Method elmFinder.Find(+ 1 overload)
Overload
Finds the first matching descendant UI element in the window or UI element.
public elm Find()
Returns
elm
If found, returns elmFinder.Result, else |
Exceptions
ArgumentException
|
AuWndException
Invalid window handle (0 or closed). See also elmFinder.In. |
AuException
Failed. For example, window of a higher UAC integrity level process. |
Remarks
To create code for this function, use tool Find UI element.
More info in elm topic.
Examples
Find link "Example"
in web page, and click. Wait max 5 s. Throw NotFoundException if not found.
var w = wnd.find(0, "* Chrome");
w.Elm["web:LINK", "Example"].Find(5).Invoke();
Try to find link "Example"
in web page. Return if not found. Click if found.
var w = wnd.find(0, "* Chrome");
var e = w.Elm["web:LINK", "Example"].Find();
//var e = w.Elm["web:LINK", "Example"].Find(-5); //waits max 5 s
if(e == null) { print.it("not found"); return; }
e.Invoke();
Overload(top)
Finds the first matching descendant UI element in the window or UI element. Can wait and throw NotFoundException.
public elm Find(Seconds wait)
Parameters
wait (Seconds)
The wait timeout, seconds. If 0, does not wait. If negative, does not throw exception when not found. |
Returns
elm
If found, returns elmFinder.Result. Else throws exception or returns |
Exceptions
NotFoundException |
ArgumentException
|
AuWndException
Invalid window handle (0 or closed). See also elmFinder.In. |
AuException
Failed. For example, window of a higher UAC integrity level process. |