Page 1 of 1

TableCells for TWlDbGrid not found using GDI-Plugin

Posted: Thu Aug 08, 2013 3:18 pm
by mgehlen
Hello,

I am currently writing automated tests for an application written in Delphi.

There I am facing the problem that DropDown-Boxes, Listboxes and tables are recognised as one big object so I needed to activate the GDI-Plugin for the respective classes.

This, in addition to a little coding, solved my troubles for DropDown- and Listboxes perfectly since I was now able to access the RawText-Elements.

However for the TWlDbGrid this does not seem to work.

1.) When I open the RanorexSpy for such a grid I do not see the cells as RawText-Elements:
1_beforeTracking.jpg
2.) If I activate the Item-Tracking I can access the table cells:
selectColumnHeader.jpg
3.) now the RawText-Elements are visible in the Spy:
2_afterTracking.jpg
4.) As soon as I click the refresh button in the spy the RawText-Elements are gone again...

I also cannot access the RawText-Elements for a TWlDbGrid inside a CodeModule:

Code: Select all

String rawTextPfad = repo.App.TPanel.Kundentabelle.GetPath().ToString() + "/rawtext" ;
Element auswahl ;
        	
bool rv = Host.Local.TryFindSingle(rawTextPfad,out auswahl);	
rv turns out to be false although the RXPath seems valid to me and worked for dropdown- and listboxes.

In conclusion I cannot access the contents of the tables in any way, which makes the test automation rather difficult. Can you please help me? Maybe I am lacking a setting of some sort ...

I attached 3 snapshotfiles (one befroe and one after tracking, the third one is after pressing refresh).

Thank you very much for your effort and best regards.

Re: TableCells for TWlDbGrid not found using GDI-Plugin

Posted: Fri Aug 09, 2013 7:54 am
by mgehlen
Hello,

here is the snapshot file.
I exceeded the limit for attachments in the initial post.

Best regards.

Re: TableCells for TWlDbGrid not found using GDI-Plugin

Posted: Fri Aug 09, 2013 3:31 pm
by Support Team
Hello,

Thank you for the snapshot file, but I cannot find any RawText elements within the snapshot files.
Did you add the class name or the process name to the GDI capture list?
I guess you added the class name. What happens if you add the process name to the GDI capture list?
I have seen that you are using Ranorex 4.0.2. Could you please try to update Ranorex and check if the issue still exists?
Thank you!

Regards,
Bernhard

Re: TableCells for TWlDbGrid not found using GDI-Plugin

Posted: Wed Aug 14, 2013 3:04 pm
by mgehlen
Hello Bernhard,

thank you very much for your answer.

I proceeded as you suggested and added the processname to the GDI capture list, but it did not change anything. As a second try I incrementally updated my Ranorex version. It is now on version 4.1.0, but the problem has become even worse: Now I am not able to get the RawElements in the Spy anymore. Hence I cannot make a screenshot like the third one in the first posting.

In addtion I think that you do not find the Rawtexts in the snapshotfile is part of the problem since I cannot get ahold of them anywhere else within Ranorex either.

I sure hope there is a way to get the Rawtext-Elements, but if not can you give me some best practices in how to deal with a table that is just one big element with now possibility to fetch the table cells?

Thank you very much for your effort.

Best regards.

Re: TableCells for TWlDbGrid not found using GDI-Plugin

Posted: Mon Aug 19, 2013 2:58 pm
by Support Team
Hello,

That's bad news. I would like to analyze the issue in more detail.
Is it possible to get the application in order to reproduce the issue on our machines?
Could you also try to update the .NET version to 4.0 on your machine please?
Thank you!

Regards,
Bernhard

Re: TableCells for TWlDbGrid not found using GDI-Plugin

Posted: Wed Aug 28, 2013 5:02 pm
by GMail
Hi,

I have the same issue. GDI Recognition and rawtext[] doesn't work anymore (it worked with trial version).

The tested application is VB6. RawText can't be recognized anywhere in the application (including datagridview, labels, and the like).

I'm working on a Windows 8 OS, so .Net Framework 4.0 is natibe to my environment.

EDIT: I find out that Ranorex Studio start the recorder and the spy tool in x86 and this is the source of the problem. If I start the Spy tool or the recorder from the BIN/x64 folder, the GDI Capture work properly.

What I need is to know how to configure Ranorex 4.1 the way it will launch x64 apps instead of x86. A quick solution is needed please.

Re: TableCells for TWlDbGrid not found using GDI-Plugin

Posted: Fri Aug 30, 2013 3:34 pm
by Support Team
Hi,

There are no differences between the trial and the full version of Ranorex, maybe you used an older Ranorex version in the trial period?

Ranorex Studio is a 32 bit application and it starts the internal 32 bit Spy, which is a little different to the standalone Spy.
In order to change the target architecture for your own Ranorex executables you have to open the properties tab of your Ranorex project.
The setting is on the 'Compiling' tab in the project properties. .NET applications are by default started as 64 bit processes on 64 bit operating systems unless the target CPU is explicitly set to the 32 bit (x86) architecture. Consequently, set the 'Target CPU' property to 'Any processor' for automating 64 bit applications and to '32-bit Intel-compatible processor' for 32 bit applications.

Please send us the log files of the 32 bit and of the 64 bit Spy, these log files will help us to analyze the issue in detail.

Please follow the steps below in order to enable the internal logging:

You will find the configuration file for logging in the following locations.
C:\Program Files (x86)\Ranorex 4.1\Bin\NLog.config
C:\Program Files (x86)\Ranorex 4.1\Bin\x64\NLog.config

Please open these files with a text editor and edit the following rule (from “Off” to “Trace”):
<!-- Set the minlevel attribute to enable logging to a local file -->
<logger name="*" minlevel="Trace" writeTo="logfile" />

After you restart Ranorex, you will find a log file with the same name as the Ranorex tool (Ranorex.Spy.log).

Please perform the following steps before you send us the log files:
Open your application and Ranorex Spy (32 bit) and track the elements inside your application.
Close and restart your application and close the 32bit Spy and open the 64 bit one.
Track the items with the 64 bit Spy again.

Thanks,
Markus