Winform: cant control any buttons or UI elements with Pywinauto
Winform: cant control any buttons or UI elements with Pywinauto
Inspect Output:
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: ""
Error: pywintypes.error: (1400, 'GetWindowRect', 'Invalid window handle.')
pywintypes.error: (1400, 'GetWindowRect', 'Invalid window handle.')
pywinauto==0.6.4
Thank you Vasily, Can I control winforms application developed using .Net Framework
– Krish0993
Sep 5 '18 at 14:01
Sure, all .NET apps are supported by “uia” backend. Find Getting Started Guide for the details about available backends.
– Vasily Ryabov
Sep 5 '18 at 17:34
0
Thanks for contributing an answer to Stack Overflow!
But avoid …
To learn more, see our tips on writing great answers.
Some of your past answers have not been well-received, and you're in danger of being blocked from answering.
Please pay close attention to the following guidance:
But avoid …
To learn more, see our tips on writing great answers.
Required, but never shown
Required, but never shown
By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.
This is known issue #534. You can try to rollback to
pywinauto==0.6.4
so far.– Vasily Ryabov
Sep 4 '18 at 21:13