How to pass POINT structure to ElementFromPoint method in Python?
问题 I'm trying to use method IUIAutomation::ElementFromPoint in Python using comtypes package. There are many examples how to use it in C++, but not in Python. This simple code reproduces the problem on 64-bit Windows 10 (Python 2.7 32-bit): import comtypes.client UIA_dll = comtypes.client.GetModule('UIAutomationCore.dll') UIA_dll.IUIAutomation().ElementFromPoint(10, 10) I get the following error: TypeError: Expected a COM this pointer as first argument Creating the POINT structure this way doesn