WindowText Problem

Ranorex Spy, Recorder, and Studio.
costamesakid
Posts: 94
Joined: Tue Jun 16, 2009 10:27 pm

WindowText Problem

Post by costamesakid » Tue Jun 23, 2009 8:42 pm

Hello,

I am having trouble Validating Text on a Qt form I am trying to test. During the recording session I click the validate button and Ranorex highlights the Qt widget that contains the Text I want to validate. In this case its the title of the form "ADSI Configuration Utility".

However, in the Properties Dialog Ranorex shows the WindowText value as "title label". So its giving me the name of the Qt Widget rather than value. I tried to manually change the code but of course it failed during playback. Is there anyway just to validate the correct Text appears on a Qt form?

Here is the Ranorex code:

Report.Info("Validating AttributeEqual condition (WindowText='ADSI Configuration Utility') on item 'ElementAdsicfg (FormADSI_Configuration_Utili)'."); Validate.Attribute(repo.FormADSI_Configuration_Utili.ElementAdsicfg, "WindowText", "ADSI Configuration Utility");

and the log:

<message time="2009/06/23 14:25:04.228" level="FAILURE" category="Validation">
<![CDATA[Attribute 'WindowText' of element '{Unknown:QWidget}' does not match the specified value (actual='title label', expected='ADSI Configuration Utility').]]>

User avatar
Support Team
Site Admin
Site Admin
Posts: 11709
Joined: Fri Jul 07, 2006 4:30 pm
Location: Graz, Austria

Re: WindowText Problem

Post by Support Team » Wed Jun 24, 2009 1:21 pm

Hello costamesakid,
I have tested several QWidget sample applications and I can`t reproduce your issue.
Could you please give use more details (Ranorex Version, Tested Application) and/or send a Ranorex Snapshot of your application to [email protected].

As I see from your log: maybe use the 'repo.FormADSI_Configuration_Utili' element instead of 'repo.FormADSI_Configuration_Utili.ElementAdsicfg' to validate the form name. On Ranorex Form elements, use the 'Title' property.

Regards,
Christian
Ranorex Support Team
.
Image

costamesakid
Posts: 94
Joined: Tue Jun 16, 2009 10:27 pm

Re: WindowText Problem

Post by costamesakid » Wed Jun 24, 2009 11:01 pm

Thanks Christian

I have sent an email to your support team

I am using Ranorex 2.1 Eval. The AUT was developed using Qt 4.3.2 and GCC 4.1.2 via MINGW.

My suspicion is that there is something within my app that is causing Ranorex not to fully identify the Qt objects. For instance, in the screenshot below when I track over the text 'What type of configuration..." Ranorex shows it as an 'Unknown QWidget'. Then when I click on the text the dialog displays the Window Text field as null.
ScreenHunter_08 Jun. 24 16.52.gif

User avatar
Support Team
Site Admin
Site Admin
Posts: 11709
Joined: Fri Jul 07, 2006 4:30 pm
Location: Graz, Austria

Re: WindowText Problem

Post by Support Team » Thu Jun 25, 2009 9:06 am

Could you please provide a Ranorex snapshot (not screenshot!) of your application? Please, attach the (zipped) snapshot to your post or send it to support_at_ranorex.com!

If you need more information on how to make snapshots, please consult the Ranorex documentation:
http://www.ranorex.com/support/user-gui ... html#c2072

Regards,
Alex
Ranorex Support Team
.
Image

costamesakid
Posts: 94
Joined: Tue Jun 16, 2009 10:27 pm

Re: WindowText Problem

Post by costamesakid » Wed Apr 07, 2010 8:49 am

Just closing this one out.

Our Qt app did not support MSAA and therefore could not be referenced by Ranorex. We have since modified our code. Thanks.

- Kevin