Comments (4)
PM = automation.WindowControl(Name='PatientManager',AutomationID='myMainWindow')
PM.SetActive()
Btn= PM.ButtonControl(ClassName = "Button",AutomationID = "_3dRebuidBtn")
Btn.Click()
from python-uiautomation-for-windows.
层级结构:
ControlType: WindowControl ClassName: Window AutomationId: myMainWindow Rect: (0, 0, 1920, 1080) Name: PatientManager Handle: 0x309E6(199142) Depth: 1
ControlType: ImageControl ClassName: Image AutomationId: menu Rect: (0, 0, 1920, 51) Name: Handle: 0x0(0) Depth: 2
ControlType: ImageControl ClassName: Image AutomationId: patientManager Rect: (220, 9, 389, 47) Name: Handle: 0x0(0) Depth: 2
ControlType: ButtonControl ClassName: Button AutomationId: patientManagerBtn Rect: (220, 11, 389, 49) Name: Handle: 0x0(0) Depth: 2
ControlType: ImageControl ClassName: Image AutomationId: _2dreading Rect: (409, 9, 578, 47) Name: Handle: 0x0(0) Depth: 2
ControlType: ButtonControl ClassName: Button AutomationId: _2dreadingBtn Rect: (409, 11, 578, 49) Name: Handle: 0x0(0) Depth: 2
ControlType: ImageControl ClassName: Image AutomationId: register Rect: (598, 9, 767, 47) Name: Handle: 0x0(0) Depth: 2
ControlType: ButtonControl ClassName: Button AutomationId: registerBtn Rect: (598, 11, 767, 49) Name: Handle: 0x0(0) Depth: 2
ControlType: ImageControl ClassName: Image AutomationId: _3dRebuid Rect: (787, 9, 956, 47) Name: Handle: 0x0(0) Depth: 2
ControlType: ButtonControl ClassName: Button AutomationId: _3dRebuidBtn Rect: (787, 11, 956, 49) Name: Handle: 0x0(0) Depth: 2
from python-uiautomation-for-windows.
目前的结果是总是定位到patientManagerBtn上面
from python-uiautomation-for-windows.
呃呃呃呃 搞明白了,
PM.ButtonControl(ClassName = "Button",AutomationID = "_3dRebuidBtn") 这里面的参数AutomationID 应该与命令行窗口打印出来的一样,应该是
AutomationId
from python-uiautomation-for-windows.
Related Issues (20)
- Win 11 x64 系统无法获取元素 HOT 3
- SendKeys密码框会丢失掉部分字符 HOT 2
- About release notes HOT 1
- Find ALL 和 find First 还不能使用吗?
- 无法捕获右键菜单点击内容值 HOT 1
- 如何选中DataGridControl里面的子选项
- Publish uiautomation as a conda package : requires pypi Source Distribution HOT 2
- 企业微信无法获取信息 HOT 2
- Add source distribution to pypi - to create conda-forge package HOT 1
- 方法 .WindowControl 和 .Control 有什么区别? HOT 1
- IsOffscreen 为什么会报错 HOT 1
- EditControl控件如何获得联想词列表?
- 请问应该怎么实现对元素进行鼠标悬停呢 HOT 1
- 希望可以对UIAumation的事件进行支持 HOT 1
- Add py.typed to the distribution
- powershell环境运行 automation.py -h 自动闪退 HOT 1
- 同时使用Python-UIAutomation-for-Windows和pyside6报错的问题 HOT 1
- SetGlobalSearchTimeout貌似没有起作用 HOT 2
- 打印pyqt5软件的控件信息时会无限循环
- 如何让点击控件鼠标移动速度快一点呢?
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from python-uiautomation-for-windows.