DBGRID - Cant get Row and Column values

Experiences, small talk, and other automation gossip.
Rima
Posts: 7
Joined: Thu Mar 07, 2019 8:17 pm

DBGRID - Cant get Row and Column values

Post by Rima » Wed Jun 05, 2019 9:48 pm

Programlist.PNG
List of prog
Programlist.PNG (46.86 KiB) Viewed 108 times
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.
Attachments
ranorexRepoandClickCode.PNG
Repo
ranorexRepoandClickCode.PNG (124.59 KiB) Viewed 107 times
propertiesWhenHover.PNG
Hover properties
propertiesWhenHover.PNG (286.47 KiB) Viewed 107 times

User avatar
N612
Posts: 91
Joined: Mon Jul 11, 2016 4:01 pm

Re: DBGRID - Cant get Row and Column values

Post by N612 » Thu Jun 06, 2019 1:04 am

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!

User avatar
odklizec
Ranorex Guru
Ranorex Guru
Posts: 4793
Joined: Mon Aug 13, 2012 9:54 am
Location: Zilina, Slovakia

Re: DBGRID - Cant get Row and Column values

Post by odklizec » Thu Jun 06, 2019 7:28 am

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.
Pavel Kudrys
Ranorex explorer at Descartes Systems

Please add these details to your questions:
  • Ranorex Snapshot. Learn how to create one >here<
  • Ranorex xPath of problematic element(s)
  • Ranorex version
  • OS version
  • HW configuration

Rima
Posts: 7
Joined: Thu Mar 07, 2019 8:17 pm

Re: DBGRID - Cant get Row and Column values

Post by Rima » Thu Jun 06, 2019 2:23 pm

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)?

User avatar
odklizec
Ranorex Guru
Ranorex Guru
Posts: 4793
Joined: Mon Aug 13, 2012 9:54 am
Location: Zilina, Slovakia

Re: DBGRID - Cant get Row and Column values

Post by odklizec » Thu Jun 06, 2019 2:54 pm

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.
Pavel Kudrys
Ranorex explorer at Descartes Systems

Please add these details to your questions:
  • Ranorex Snapshot. Learn how to create one >here<
  • Ranorex xPath of problematic element(s)
  • Ranorex version
  • OS version
  • HW configuration

Rima
Posts: 7
Joined: Thu Mar 07, 2019 8:17 pm

Re: DBGRID - Cant get Row and Column values

Post by Rima » Thu Jun 06, 2019 3:49 pm

Snapshot of DBGrid
Attachments
DBGrid.rxsnp
SnapshotOfGrid
(47.36 KiB) Downloaded 6 times

User avatar
odklizec
Ranorex Guru
Ranorex Guru
Posts: 4793
Joined: Mon Aug 13, 2012 9:54 am
Location: Zilina, Slovakia

Re: DBGRID - Cant get Row and Column values

Post by odklizec » Thu Jun 06, 2019 5:46 pm

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
DBGrid.png (91.98 KiB) Viewed 77 times
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/
Pavel Kudrys
Ranorex explorer at Descartes Systems

Please add these details to your questions:
  • Ranorex Snapshot. Learn how to create one >here<
  • Ranorex xPath of problematic element(s)
  • Ranorex version
  • OS version
  • HW configuration

User avatar
odklizec
Ranorex Guru
Ranorex Guru
Posts: 4793
Joined: Mon Aug 13, 2012 9:54 am
Location: Zilina, Slovakia

Re: DBGRID - Cant get Row and Column values

Post by odklizec » Fri Jun 07, 2019 7:35 am

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 ;)
Pavel Kudrys
Ranorex explorer at Descartes Systems

Please add these details to your questions:
  • Ranorex Snapshot. Learn how to create one >here<
  • Ranorex xPath of problematic element(s)
  • Ranorex version
  • OS version
  • HW configuration

Rima
Posts: 7
Joined: Thu Mar 07, 2019 8:17 pm

Re: DBGRID - Cant get Row and Column values

Post by Rima » Tue Jun 11, 2019 1:26 pm

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.
Attachments
GDIAdv.PNG
GDI settings
GDIAdv.PNG (161.41 KiB) Viewed 43 times

User avatar
odklizec
Ranorex Guru
Ranorex Guru
Posts: 4793
Joined: Mon Aug 13, 2012 9:54 am
Location: Zilina, Slovakia

Re: DBGRID - Cant get Row and Column values

Post by odklizec » Tue Jun 11, 2019 3:17 pm

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?
Pavel Kudrys
Ranorex explorer at Descartes Systems

Please add these details to your questions:
  • Ranorex Snapshot. Learn how to create one >here<
  • Ranorex xPath of problematic element(s)
  • Ranorex version
  • OS version
  • HW configuration