检查输出:
How found: Selected from tree...
Name: "Install Service"
ControlType: UIA_ButtonControlTypeId (0xC350)
LocalizedControlType: "button"
BoundingRectangle: {l:819 t:599 r:920 b:622}
IsEnabled: true
IsOffscreen: false
IsKeyboardFocusable: true
HasKeyboardFocus: false
AccessKey: ""
ProcessId: 5924
RuntimeId: [2A.1A50414]
AutomationId: "btnInstallSvc"
FrameworkId: "WinForm"
ClassName: "WindowsForms10.BUTTON.app.0.141b42a_r9_ad1"
NativeWindowHandle: 0x1A50414
ProviderDescription: "[pid:18028,providerId:0x1A50414 Main:Nested [pid:5924,providerId:0x1A50414 Main(parent link):Microsoft: MSAA Proxy (unmanaged:uiautomationcore.dll)]; Hwnd(parent link):Microsoft: HWND Proxy (unmanaged:uiautomationcore.dll)]"
IsPassword: false
HelpText: ""
错误:pywintypes.error: (1400, 'GetWindowRect', 'Invalid window handle.')