Page 1 of 1

Qt custom Widget and data members

Posted: Thu Sep 01, 2016 10:21 am
by zere
Hi,

I'm responsible to perform a Ranorex POC on our Qt application.
I have a custom widget which holds 2 data members which have no UI representation. Both are simply an int and string.
The int is used to count number of clicks on the custom widget.
The string is used as a unique identifier (something like GUID).

I cannot find a way to identify those members by Ranorex :cry:
What should I define in my code in order for those two data members to be recognized by Ranorex :?:

Thanks,
Zere

Re: Qt custom Widget and data members

Posted: Thu Sep 01, 2016 1:26 pm
by krstcs
Ranorex is a Functional User Interface Test Automation tool. If there is no interface element that presents the information, then you will likely need to have your developers create one, even if it is hidden. Ranorex is not designed to work with internal data structures of the SUT, only with the UI.

It might be possible to get the data some other way, but it would require a large amount of user code on your part, and it would probably be easier to just have your devs create a hidden UI element for each data element you need to validate.

Re: Qt custom Widget and data members

Posted: Thu Sep 08, 2016 7:04 am
by zere
HI,

Thanks for the reply.

After more investigation I've found out that:
By using Q_PROPERTY in your QWidget derived class you can export any piece of data you want without a dedicated UI element.
It will show in the Dynamic section Ranorex Spy

Hope it helps anyone.