30 Star 86 Fork 18

yinkaisheng / PythonUIAutomation4Windows

Create your Gitee Account
Explore and code with more than 6 million developers,Free private repositories !:)
Sign up
Clone or Download
Cancel
Notice: Creating folder will generate an empty file .keep, because not support in Git
Loading...
readme.md

Moved to GitHub: Python-UIAutomation-for-Windows.

The automation module

This module is for automation on Windows(Windows XP with SP3, Windows Vista, Windows 7 and Windows 8/8.1/10). It supports automation for the applications which implmented IUIAutomation, such as MFC, Windows Form, WPF, Modern UI(Metro UI), Qt and Firefox.

automation is shared under the MIT Licence. This means that the code can be freely copied and distributed, and costs nothing to use.

Only 3 files(automation.py, AutomationClientX86.dll and AutomationClientX64.dll) are needed for UIAutomation. Other scripts are all demos.

Run 'automation.py -h' for help. Run automate_notepad_py3.py to see a simple demo.

Microsoft IUIAutomation Minimum supported client: Windows 7, Windows Vista with SP2 and Platform Update for Windows Vista, Windows XP with SP3 and Platform Update for Windows Vista [desktop apps only]

Microsoft IUIAutomation Minimum supported server: Windows Server 2008 R2, Windows Server 2008 with SP2 and Platform Update for Windows Server 2008, Windows Server 2003 with SP2 and Platform Update for Windows Server 2008 [desktop apps only]

If "RuntimeError: Can not get an instance of IUIAutomation" occured when running automation.py, You need to install update KB971513 for your Windows. You can also download from here https://github.com/yinkaisheng/WindowsUpdateKB971513ForIUIAutomation

Another UI tool inspectX86.exe or inspectX64.exe supplied by Microsoft can also be used to see the UI elements.

Inspect (Inspect.exe) is a Windows-based tool that enables you select any UI element and view the element's accessibility data. You can view Microsoft UI Automation properties and control patterns, as well as Microsoft Active Accessibility properties. Inspect also enables you to test the navigational structure of the automation elements in the UI Automation tree, and the accessible objects in the Microsoft Active Accessibility hierarchy.

Inspect is installed with the Windows Software Development Kit (SDK) for Windows 8. (It is also available in previous versions of Windows SDK.) It is located in the \bin<platform> folder of the SDK installation path (Inspect.exe).


Author mail: yinkaisheng@foxmail.com

具体用法参考

例子:使用python UIAutomation从QQ2016(8.0)群界面获取所有群成员详细资料

Inspect Inspect

WindowsDesktop Desktop

Qt5 Qt5

Firefox Firefox

Wireshark(version must >= 2.0) Wireshark

QQ QQ

Batch rename pdf bookmark bookmark

Repository Comments ( 6 )

Sign in to post a comment

About

python封装微软UIAutomation API,使编写UI自动化脚本非常容易。支持py2,py3,x86,x64,支持MFC, WindowsForm, WPF, Modern UI(Metro UI), Qt, IE, FireFox等程序的UI自动化。最新代码请到GitHub下载,码云上不再更新。 expand collapse
Cancel

Releases

No release

PythonUIAutomation4Windows

Contributors

All

Activities

Load More
can not load any more
Python
1
https://git.oschina.net/yinkaisheng/PythonUIAutomation4Windows.git
git@git.oschina.net:yinkaisheng/PythonUIAutomation4Windows.git
yinkaisheng
PythonUIAutomation4Windows
PythonUIAutomation4Windows
master

Search

161121 f78d6d6f 1850385 154831 86f8c370 1850385