Page 1 of 1

DBGRID - Cant get Row and Column values

Posted: Wed Jun 05, 2019 9:48 pm
by Rima
ranorexRepoandClickCode.PNG
I have the element DbgrProgStage4 who's value is "element[@controlname='ProgStage4Fra']/?" and further it should be column or field name.
When i track the row cell, it takes the table as image (as in full table). I can click the table rows manually and select the item(program) from the list but i cannot click with ranorex and select the program of that table.
I have tried to manipulate the xpath in spy... but i was unsuccessful.
If i click the row in dbgrid it has different locations but the attribute name remains same.(it takes it like a image or something whole).

Please help me to understand how can i capture the row for testing the program.

Re: DBGRID - Cant get Row and Column values

Posted: Thu Jun 06, 2019 1:04 am
by N612
TDBGrid is not a supported Delphi element type at this time. I recommend creating a feature request to support this Delphi element type. Try the GDI plugin as an alternative (not viable in all applications). There is always pixel-based and image-based automation as a last resort too.

Hope this helps!

Re: DBGRID - Cant get Row and Column values

Posted: Thu Jun 06, 2019 7:28 am
by odklizec
Hi,

According to Ranorex release notes, support for DBGrid has been added in Ranorex 9.0.1...

Code: Select all

Added support for additional Delphi controls: filter icons, tab headers, DBGrid (for Delphi versions <= 10.1)
Form your post, it's not entirely clear, what Ranorex version do you use? Dark UI mode suggests you are using, at very least, 9.0.0? So if you are not on 9.0.1 or 9.1.0 yet, please update. Additionally, make sure Delphi plugin is enabled in Ranorex settings.

Re: DBGRID - Cant get Row and Column values

Posted: Thu Jun 06, 2019 2:23 pm
by Rima
The version is 9.0.0 for Ranorex. I don't want it with gdi testing. I want to click the item from the column and run the program.
that's my requirement.
Can you send me the setting information for Delphis plugin to enable? so that i can check if it is enable or disable in my solution.
Can anyone suggest the way how to manipulate the xpath for my different attributes (so that is clicks my items in the column)?

Re: DBGRID - Cant get Row and Column values

Posted: Thu Jun 06, 2019 2:54 pm
by odklizec
Hi,

As I mentioned before, DBGrid support has been added in 9.0.1. So you should definitely update your existing version with most recent one. This should fix your problem with DBGrid content recognition. Additionally, 9.0.1 (and 9.1.0 too) introduced a LOT of bug fixes, so sticking with 9.0.0 is a very bad idea ;)

At next, if you want any help with xpaths, please upload a Ranorex snapshot (NOT screenshot) of the given grid. Screenshots are useless for xpath evaluation. But again, first update Ranorex with most recent version. Snapshot taken with 9.0.0 will not help either.

Re: DBGRID - Cant get Row and Column values

Posted: Thu Jun 06, 2019 3:49 pm
by Rima
Snapshot of DBGrid

Re: DBGRID - Cant get Row and Column values

Posted: Thu Jun 06, 2019 5:46 pm
by odklizec
Hi,

I'm afraid, the snapshot you posted only supports what I've suggested before. As I mentioned before, DBGrid support (and support of many other Delphi controls), has been added in 9.0.1. The snapshot you posted shows, that you are still on 9.0.0! Additionally, while accessing the DBGrid control stored in your snapshot, there is invoked a Ranorex technology limitation warning, which clearly says, that your Delphi version is NOT supported.
DBGrid.png
So, please update your Ranorex version with 9.0.1 or even better, most recent one 9.1.0 and try to access the DBGrid again. Hope this helps?

BTW, make sure your Delphi version is amongs the supported versions, mentioned here:
https://www.ranorex.com/help/latest/int ... hi-plugin/

Re: DBGRID - Cant get Row and Column values

Posted: Fri Jun 07, 2019 7:35 am
by odklizec
Hi,

I think I have to correct myself a bit. It seems that DBGrid is supported longer than just from Ranorex 9.0.1, as I stated before. It's just that in 9.0.1, they added support for DBGrid (and other controls) created with Delphi versions <= 10.1.

Additionally, what you might try, is to completely disable Delphi plugin in Ranorex settings. A dedicated Delphi plugin, has been introduced in 8.2.0. And although it should make the recognition of Delphi more reliable and faster, it may, in some cases, not work as expected, especially in case of unsupported Delphi versions. Hence there is an option to disable native Delphi plugin. But Ranorex may still be able to identify and work with Delphi controls, using the old Delphi support! So give it a try and simply disable the Delphi plugin in Ranorex settings.

Anyway, you should still update your existing Ranorex 9.0.0. If for nothing else, then for the amount of bug fixes introduced in 9.0.1 and 9.1.0 ;)

Re: DBGRID - Cant get Row and Column values

Posted: Tue Jun 11, 2019 1:26 pm
by Rima
Am I doing right? I don't et any rawtext…. how do you get that raw text? I have added ^ … $ in processname too in my later work.

Re: DBGRID - Cant get Row and Column values

Posted: Tue Jun 11, 2019 3:17 pm
by odklizec
Hi,

Have you refreshed the Spy tree, after adding element/process to the GDI capture list? Also, have you tried to disable Delphi plugin in Settings (Settings >> Plugins tab), as I've suggested before?