支持自动化Win32,MFC,WPF,Modern UI(Metro UI), Qt, IE, Firefox等UI框架,最新版uiautomation2.0目前只支持Python 3版本,依赖comtypes和typing这两个包,但不要使用3.7.6和3.8.1这两个版本,comtypes在这两个版本中不能正常工作。
Automate your GUI tests with QF-Test, the professional testing tool! Easy to use ✓ Cross-platform on Windows, Linux, macOS ✓ Cross-browser ✓
uiautomation模块项目地址:https://github.com/yinkaisheng/Python-UIAutomation-for-Windows uiautomation是yinkaisheng业余时间开发一个模块。封装了微软UIAutomation API,支持自动化Win32,MFC,WPF,Modern UI(Metro UI), Qt, IE, Firefox(version<=56 or >=60), Chrome谷歌游览器和基于Electron开发的应用程序(加启动...
3、如何判断程序的backend是’win32’还是’uia’呢?官方文档中推荐使用spy++和inspect来检查。有人专门整理了一下,放在github上了https://github.com/blackrosezy/gui-inspect-tool。 代码语言:javascript 复制 Switch Inspect.exe intoUIAmode(usingMSUIAutomation).If it can show more controls and their propert...
calc = uiautomation.WindowControl(Name="计算器") self.calc_list = ["二", "加", "八", "等于"] self.result = "10" def tearDown(self) -> None: time.sleep(1) self.calc.ButtonControl(Name="关闭 计算器").Click() def test_toolbar(self): time.sleep(1) for i in range(0, len...
Provides a base class that exposes the automation peer for an associated owner class to Microsoft UI Automation.
That's all . The AutomationElement.RootElement represents the desktop , all other UI elements are children of the desktop . We need to search the tree to find the required automation element . The tree hierarchy can be found by a tool called UISpy that comes as a part of Windows SDK ....
uiautomation是作者业余时间开发的供自己使用的一个python模块; 所以安装的时候直接: pip install uiautomation UIAutomation实现的自动化支持微软提供的各种界面开发框架,如Win32, MFC, Windows Forms, WPF, Metro App, IE; 另外Qt, Firefox, Chrome实现了UI Automation Provider,也支持UIAutomation; ...
import timeclassPywin(object):"""pywin framwork mainclasstool_name : 程序名称,支持带路径 windows_name : 窗口名字"""SLEEP_TIME =1def __init__(self):"""初始化方法,初始化一个app"""self.app =application.Application() def run(self, tool_name):"""启动应用程序"""self.app.start_(tool_nam...
Windows.UI.Input.Preview Windows.UI.Input.Preview.Injection Windows.UI.Input.Spatial Windows.UI.Notifications Windows.UI.Notifications.Management Windows.UI.Notifications.Preview Windows.UI.Popups Windows.UI.Shell Windows.UI.StartScreen Windows.UI.Text Windows.UI.Text.Core Windows.UI.UIAutomation Windows...