TableCells for TWlDbGrid not found using GDI-Plugin

Technology specific object identification, supported applications, web technologies, and 3rd party controls.
mgehlen
Posts: 3
Joined: Fri Aug 02, 2013 8:52 am

TableCells for TWlDbGrid not found using GDI-Plugin

Post by mgehlen » Thu Aug 08, 2013 3:18 pm

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
1_beforeTracking.jpg (25.73 KiB) Viewed 1197 times
2.) If I activate the Item-Tracking I can access the table cells:
selectColumnHeader.jpg
selectColumnHeader.jpg (29.22 KiB) Viewed 1197 times
3.) now the RawText-Elements are visible in the Spy:
2_afterTracking.jpg
2_afterTracking.jpg (49.98 KiB) Viewed 1197 times
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.

mgehlen
Posts: 3
Joined: Fri Aug 02, 2013 8:52 am

Re: TableCells for TWlDbGrid not found using GDI-Plugin

Post by mgehlen » Fri Aug 09, 2013 7:54 am

Hello,

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

Best regards.
Attachments
Snapshots.zip
(1.4 MiB) Downloaded 205 times

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

Re: TableCells for TWlDbGrid not found using GDI-Plugin

Post by Support Team » Fri Aug 09, 2013 3:31 pm

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
.
Image

mgehlen
Posts: 3
Joined: Fri Aug 02, 2013 8:52 am

Re: TableCells for TWlDbGrid not found using GDI-Plugin

Post by mgehlen » Wed Aug 14, 2013 3:04 pm

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.

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

Re: TableCells for TWlDbGrid not found using GDI-Plugin

Post by Support Team » Mon Aug 19, 2013 2:58 pm

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
.
Image

GMail
Posts: 9
Joined: Tue Jul 16, 2013 10:10 pm

Re: TableCells for TWlDbGrid not found using GDI-Plugin

Post by GMail » Wed Aug 28, 2013 5:02 pm

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.

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

Re: TableCells for TWlDbGrid not found using GDI-Plugin

Post by Support Team » Fri Aug 30, 2013 3:34 pm

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
.
Image