Jump to content

Automate Qt and QWidgets


 Share

Recommended Posts

With this topic

'?do=embed' frameborder='0' data-embedContent>>

You an find with the simple spy all the objects (same result as with ranorex spy) and highlight them

However same as for Ranorex spy I cannot reveal any usefull text or other property to usefull check.

With the link given you can identify the object by its index

Link to comment
Share on other sites

I played a little with QT and QWidgets by installing the IDE QT Creator

  • When I use sample calqlatr and compile that its initially not accessible

 

  • only when I add code like
//! [button]
    Accessible.name: text
    Accessible.description: "This button does " + text
    Accessible.role: Accessible.Button
    function accessiblePressAction() {
        button.clicked()
    }
    //! [button]

To a button.qml file those buttons become accessible and recognizable by spy tools

  • So unfortunately it seems that developers that use QT but are not adding 
    accessible.  ......   to their controls
    the QT application will not expose much by default
     
  • a QT Developer should read more on this 
    http://qt-project.org/doc/qt-5/accessible.html

So whenever you encounter an application like that send the developer above link to reconsider just add minimally one line

Accessible.name : text // or hardcoded string "myname" when there is no variable text available
Link to comment
Share on other sites

  • 2 months later...

Thank you Junkew!

I'm wondering, do you have any new experiences with automating QT?

I am trying the same thing, and with accessibility enabled (i have confirmed that qtaccessiblewidgets.dll is linked) i can see using Ranorex Spy that field such as "Role", "Name" and "Class" are updated. (fields in the "Element" window)

Caption/text or Control Id (field in the "Control" window) however are not updated. Clicking a button using the "Element" field should work, but I'm worried about reading out a certain text value from a Qlabel as the "Value" field is not updated.

Do you (or anyone else) have any experience with reading out values (instead of just clicking buttons)?

Thanks!

Bavo

Link to comment
Share on other sites

What is the simple spy of the iuiautomation thread giving. It reads allmost all properties that are readable. Could be that your needed value is in another property.

I have never worked further with QTWidgets besides above finding out how it works and as it seems only accessible when developer takes accessibility into consideration.

Link to comment
Share on other sites

  • 3 months later...
  • 2 years later...
  • 2 years later...
  • Developers

@kevinxauxa,

I have removed the attachment because:

  • prashannaa hasn't been on our forums for 4 years!
  • We don't want to trust any binary/executable posted by somebody that just joined. Nothing personal, just common sense. ;) 

Jos

SciTE4AutoIt3 Full installer Download page   - Beta files       Read before posting     How to post scriptsource   Forum etiquette  Forum Rules 
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Link to comment
Share on other sites

  • 3 weeks later...

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...