Method wnd.ButtonClick(+ 1 overload)
Overload
Finds and clicks a button in this window. Does not use the mouse.
public void ButtonClick(int id)
Parameters
Exceptions
AuWndException
This variable is invalid (window not found, closed, etc). |
NotFoundException
Button not found. |
Remarks
This function just calls wnd.Child and mouse.postClick.
Uses this code: mouse.postClick(this.Child(1, id: id));
Examples
wnd.find("Options").ButtonClick(2);
Overload(top)
Finds and clicks a button in this window. Does not use the mouse.
public void ButtonClick(string name, bool asControl = false, string roleCN = null)
Parameters
name (string)
Button name. String format: wildcard expression. |
asControl (bool)
If |
roleCN (string)
UI element role or control class name (if asControl |
Exceptions
ArgumentException
Invalid name (when starts with |
AuWndException
This variable is invalid (window not found, closed, etc). |
NotFoundException
Button not found. |
AuException
Failed to click. For example need to activate the window. No exception if asControl |
Remarks
This function is just a shorter way to call other functions that have more options but require more code to call. If asControltrue
, it calls wnd.Child and mouse.postClick. Else wnd.Elm, elmFinder.this[], elmFinder.Find and elm.Invoke.
Examples
wnd.find("Options").ButtonClick("Cancel");