Jump to content



Photo

[---] QT GUI Application automation (2)

QT GUI

  • Please log in to reply
10 replies to this topic

#1 MvGulik

MvGulik

    Universalist

  • Active Members
  • PipPipPipPipPipPip
  • 2,795 posts

Posted 23 January 2012 - 09:10 PM

Wonder if anyone might have some additional information about possible automating QT GUI's stuff. (other than the general pixel scanning stuff of course.)
+ related to autoit in some way. (or else it would be a Chat topic.)

That there is a way when there is a will is clear -> http://smartbear.com/products/qa-tools/automated-testing/testing-qt-apps/
See the demo for the app in action.
Thinking this is probably done with the help of some QT API. But than again, Don't know that much about QT.

... With all that Java (and other multi OS code/cross platform, etc) stuff, real win windows are getting rare. ;) ...

---

Test case finished successful.
Now the rest ... and I'm off hunting for a martian beagle, or 2.
... Well that what the plan ... :)

Edited by MvGulik, 24 January 2012 - 10:00 PM.

Don't Fall in Love With Ideas"If you fall in love with an idea, you won't see the merits of alternative approaches -- and will probably miss an opportunity or two. One of life's great pleasures is letting go of a previously cherished idea. Then you're free to look for new ones. What part of your idea are you in love with? What would happen if you kissed it goodbye?"







#2 water

water

    ?

  • MVPs
  • 10,714 posts

Posted 23 January 2012 - 09:26 PM

Does this help?

UDFs:

Active Directory (2012-10-12 - Version 1.3.0.0 released) - Download - General Help & Support - Example Scripts - Wiki

OutlookEX (2012-10-07 - Version 0.9.0.0 released) - Download - General Help & Support - Example Scripts - Wiki

ExcelChart (2013-01-21 - Version 0.3.1.1 released) - Download - General Help & Support - Example Scripts

WordEX (2012-12-29 - Version 1.3 released) - Download

ExcelEX (2013-05-11 - Alpha 4 released) - Download


#3 MvGulik

MvGulik

    Universalist

  • Active Members
  • PipPipPipPipPipPip
  • 2,795 posts

Posted 23 January 2012 - 09:42 PM

Note sure yet ... but will dig into it. Thanks.

(+adding 'QWidget' to my search parameters.)
Don't Fall in Love With Ideas"If you fall in love with an idea, you won't see the merits of alternative approaches -- and will probably miss an opportunity or two. One of life's great pleasures is letting go of a previously cherished idea. Then you're free to look for new ones. What part of your idea are you in love with? What would happen if you kissed it goodbye?"

#4 MvGulik

MvGulik

    Universalist

  • Active Members
  • PipPipPipPipPipPip
  • 2,795 posts

Posted 23 January 2012 - 10:52 PM

Lets drop this in before some def likes to have some fun.

Turns out Au3Info now also will give back information on Qt windows. :)

3.3.7.7 (31st May, 2011) (Beta)

Au3Info:
- Added: Option "Use Spy++ control detection logic" toggle added to Au3Info (this was the mode always used in recent
releases, but the very old method that used to be used is useful in certain applications (for example, putty.exe)
- Fixed #1746: Option "Use Spy++ control detection logic" toggle added to Au3Info.





@Water
I'm pretty sure now it helped. ;)
---
(If only all 'users' where that easy) ;)

Edited by MvGulik, 25 January 2012 - 07:20 PM.

Don't Fall in Love With Ideas"If you fall in love with an idea, you won't see the merits of alternative approaches -- and will probably miss an opportunity or two. One of life's great pleasures is letting go of a previously cherished idea. Then you're free to look for new ones. What part of your idea are you in love with? What would happen if you kissed it goodbye?"

#5 water

water

    ?

  • MVPs
  • 10,714 posts

Posted 24 January 2012 - 08:36 AM

Glad to be of service :)

UDFs:

Active Directory (2012-10-12 - Version 1.3.0.0 released) - Download - General Help & Support - Example Scripts - Wiki

OutlookEX (2012-10-07 - Version 0.9.0.0 released) - Download - General Help & Support - Example Scripts - Wiki

ExcelChart (2013-01-21 - Version 0.3.1.1 released) - Download - General Help & Support - Example Scripts

WordEX (2012-12-29 - Version 1.3 released) - Download

ExcelEX (2013-05-11 - Alpha 4 released) - Download


#6 MvGulik

MvGulik

    Universalist

  • Active Members
  • PipPipPipPipPipPip
  • 2,795 posts

Posted 24 January 2012 - 07:31 PM

Erm ... A correction and a word of warning here.
Don't know if this is just something related to the target app or just the Qt GUI.

But RanorexSpy seems to do something to the target App/GUI that also enables Au3info to read the Qt controls.

For AutoIt scripts this results in some commands also changing there output (Data / NoData). But not all.
Still a major speed bump I could have done without.

Nope, back at where I started. :)

---

Restart:
- "Qt accessibility" ...
- "Microsoft Active Accessibility" ...
- interface-autoitobject-iuiautomation ...
- Au3info returning Qt GUI data again after after running junkew's code.
- ... (more reading todo)
- ... Bah, Know that with 'uiautomationcore.dll' and/or 'Oleacc.dll' there is a solution. But wrapping my head around this stuff ... ;)

Edited by MvGulik, 25 January 2012 - 04:49 AM.

Don't Fall in Love With Ideas"If you fall in love with an idea, you won't see the merits of alternative approaches -- and will probably miss an opportunity or two. One of life's great pleasures is letting go of a previously cherished idea. Then you're free to look for new ones. What part of your idea are you in love with? What would happen if you kissed it goodbye?"

#7 MvGulik

MvGulik

    Universalist

  • Active Members
  • PipPipPipPipPipPip
  • 2,795 posts

Posted 12 February 2012 - 09:52 AM

Nope ... Project kinda stalled on the general complexity (to me) of the code in interface-autoitobject-iuiautomation ... O well.
Don't Fall in Love With Ideas"If you fall in love with an idea, you won't see the merits of alternative approaches -- and will probably miss an opportunity or two. One of life's great pleasures is letting go of a previously cherished idea. Then you're free to look for new ones. What part of your idea are you in love with? What would happen if you kissed it goodbye?"

#8 junkew

junkew

    Universalist

  • Active Members
  • PipPipPipPipPipPip
  • 322 posts

Posted 26 February 2012 - 06:59 PM

What do you want to tackle? With the iuiautomation stuff you can do a lot of stuff in an easy manner once you get the logic behind it and if the widgets under test support accessibility
QT in general supports accessibility

#9 MvGulik

MvGulik

    Universalist

  • Active Members
  • PipPipPipPipPipPip
  • 2,795 posts

Posted 26 February 2012 - 08:37 PM

Tackle: Automation-control (read+write) of the program HiView.

The "once you get the logic behind it" part was/is kinda eluding me. Or at least that's what its feels like.
To more specific on what part(s) I get hangup I probably should take a other look/try at it. Bottom line being a bit of 'not managing to extract a smaller working code sample to play/experiment with. (From your last posted example code, which was kinda big.)
Don't Fall in Love With Ideas"If you fall in love with an idea, you won't see the merits of alternative approaches -- and will probably miss an opportunity or two. One of life's great pleasures is letting go of a previously cherished idea. Then you're free to look for new ones. What part of your idea are you in love with? What would happen if you kissed it goodbye?"

#10 junkew

junkew

    Universalist

  • Active Members
  • PipPipPipPipPipPip
  • 322 posts

Posted 26 February 2012 - 09:51 PM

I doubt if that application can be tackled with IAccessible or IUiautomation. Unfortunately QT widgets do not expose all child controls.
I tried with inspect.exe (part of win32 SDK tools) to see how QT stuff is recognized.

An alternative would be to build and integrate some stuff thats here (but that would be a whole project to integrate into AUTOIT librarys): https://github.com/robertknight/Qt-Inspector

#11 MvGulik

MvGulik

    Universalist

  • Active Members
  • PipPipPipPipPipPip
  • 2,795 posts

Posted 27 February 2012 - 02:12 AM

Bummer.

Qt-Inspector: even way more over my head.

Thanks anyway.
Don't Fall in Love With Ideas"If you fall in love with an idea, you won't see the merits of alternative approaches -- and will probably miss an opportunity or two. One of life's great pleasures is letting go of a previously cherished idea. Then you're free to look for new ones. What part of your idea are you in love with? What would happen if you kissed it goodbye?"




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users