jarmo / RAutomation

RAutomation
MIT License
100 stars 33 forks source link

Click Controls the UIA Way #43

Closed leviwilson closed 11 years ago

leviwilson commented 11 years ago

I've updated the MsUia::Functions#control_click method to use UIA rather than sending a BM_CLICK to the control itself. Any automation control window that implements InvokePattern (buttons), TogglePattern (checkboxes) or SelectionItemPattern (radio buttons) can be clicked.

leviwilson commented 11 years ago

Note

With e9f5155, I realized that this could be an issue with modal dialogs as described in this Microsoft document. Therefore, I added the RA_PointAndClick that will use UIA to get the AutomationElement::GetClickablePoint, move the cursor there and then click it.