Giter Site home page Giter Site logo

Comments (4)

qdwangjianjun avatar qdwangjianjun commented on June 22, 2024

PM = automation.WindowControl(Name='PatientManager',AutomationID='myMainWindow')
PM.SetActive()
Btn= PM.ButtonControl(ClassName = "Button",AutomationID = "_3dRebuidBtn")
Btn.Click()

from python-uiautomation-for-windows.

qdwangjianjun avatar qdwangjianjun commented on June 22, 2024

层级结构:
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.

qdwangjianjun avatar qdwangjianjun commented on June 22, 2024

目前的结果是总是定位到patientManagerBtn上面

from python-uiautomation-for-windows.

qdwangjianjun avatar qdwangjianjun commented on June 22, 2024

呃呃呃呃 搞明白了,
PM.ButtonControl(ClassName = "Button",AutomationID = "_3dRebuidBtn") 这里面的参数AutomationID 应该与命令行窗口打印出来的一样,应该是
AutomationId

from python-uiautomation-for-windows.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.