I like the pywinauto API for UI automation.
However it lacks essential features for me like automation for metro/modern UI applications.
This project, also written in python, supports much more UI things:
https://github.com/yinkaisheng/Python-UIAutomation-for-Windows
Maybe could you add some code from this project inside pywinauto?
Everyone is waiting for this feature. :)
Issue #3 (WPF support) was requested 5 years ago.
UI Automation API support is planned to release until February, 29 (0.6.0).
We already have some basic prototype in UIA branch. But the API is not finalized.
Will it support latest uiautomation features like UIAComWrapper?
Will the API (app.dialog.control) change?
The API will not change too much. We're just trying to be more PEP-8 complaint. So line app.Dialog.OK.ClickInput() will change to app.Dialog.OK.click_input(). The old name ClickInput() will be supported in 0.6.x for native wrappers, but not in 0.7.0.
UIA wrappers will have PEP-8 complaint method names only.
We use native UIAutomationClient.dll so it should work the same way as UIAComWrapper (as far as I understand it should NOT contain .NET specific bugs).
0.6.0 release has been postponed until July, 2016.
Hello,
Is v0.6 ready to use ?
I'd to test win.window_(automation_id=321)
Thanks
Hi @sragons, the work is still in progress. We just need more contributors in order to finish the planned features. Refer to this TODO page on our Wiki for more details. You can play with UIA branch it's quite stable only lacks wrappers for many controls.
Regarding your question (provided you use UIA branch). AFAIK, you can't refer to a top window by automation_id as the top window doesn't have it. However, you can use filtering by `automation_id to find any children of the window. Check my small example below.
from pywinauto import Application
# create Application object with UIA support
app = Application(backend='uia')
# start Notepad
app.start("notepad.exe")
# find a child control with automation_id = 15
# Notice that the parameter is called 'auto_id'
# and the id itself is passed as a string (not int)
ctl = app.UntitledNotepad.child_window(auto_id="15")
# print indentifiers of the found control
ctl.print_control_identifiers()
print(ctl.friendly_class_name())
Thank you for your answer
I'd to try to contribute ...
Hello,
What is the difference between window_ and child_window (or Window_ for v0.5) methods ?
thank you
Hi @sragons, window_ is used for top-level windows (it's a method of Application object) while child_window is for a control specification inside the subtree (it's a method of WindowSpecification object which create another nested WindowSpecification object with 2 or more search criteria).
Final release deadline for 0.6.0 is October, 30.
We're going to release all that we have time to finalize. Fixes on the edges will be provided in further updates.
Congratulation for the huge work
We're going to publish the release on October, 31 with some last minute improvements for hooks module.
Faced with some problems while uploading to TestPyPI. Need some more time to resolve. My apologies.
Now pip install -U pywinauto should work. Anyone please check it on your side. I have some strange behavior on py3.4 (32-bit): installer doesn't try to install pypiwin32 somehow.
0.6.0 is published! Thanks a lot for everyone involved into this interesting marathon.
If you see some issues, please submit it separately. Enjoy!
Amazing job! Thanks!