Ranorex not capturing the table data

Mobile Testing, Android App Testing.
Priyanshu
Posts: 30
Joined: Wed May 22, 2019 5:48 am

Ranorex not capturing the table data

Post by Priyanshu » Mon Jun 08, 2020 7:36 pm

Hi Team,

I have attached the snapshot also screen shot , I have a grid in the desktop application. I tried to capture the data from Ranorex spy but only it captures the container but I am not getting its data.
Please help me out .
You do not have the required permissions to view the files attached to this post.

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

Re: Ranorex not capturing the table data

Post by odklizec » Tue Jun 09, 2020 6:24 am

Hi,

At first, you are using an outdated Ranorex version (9.2.0). Please update it with most recent 9.3.2 and try it again.
At next, the table in question appears to be Delphi-based control? Are you sure it's made with supported Delphi version? See this Ranorex help page for more details:
https://www.ranorex.com/help/latest/int ... hi-plugin/

What you can try, is to disable Delphi plugin in Spy/Ranorex Studio settings (Settings >> Plugins Tab > Delphi option). This seemingly illogical step may eventually help you with identification of old and unsupported Delphi controls ;)

And if above steps fail, your only remaining hope, aside asking Ranorex support what to do next, is to use GDI Capture approach. For more details see this post:
https://www.ranorex.com/help/latest/ran ... e-feature/
Sadly, GDI Capture is somewhat hard to use with table-like controls. But it's still better than nothing ;)
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

Priyanshu
Posts: 30
Joined: Wed May 22, 2019 5:48 am

Re: Ranorex not capturing the table data

Post by Priyanshu » Tue Jun 09, 2020 9:02 pm

i,
Firstly I have updated the Ranorex to latest version 9.3.2 , but it did not track the table data.
Then I followed for the next suggestion to use GDI Capture approach.
I am getting all data like RawTest.. I am not sure how to consume it for my validation. Please help for the same.
You do not have the required permissions to view the files attached to this post.

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

Re: Ranorex not capturing the table data

Post by odklizec » Wed Jun 10, 2020 6:37 am

Hi,

Well, as I've mentioned, working with tables and RawTexts is a very dirty job. Luckily, I was never in the situation that I had to validate entire GDI Capture-based table. At worst, I've validated some individual RawText elements. Your best hope lies in utilization of Row/Cell attribute of each RawText. But I'm afraid, I can't provide you with sample code. I just don't have any sample code like this and creating such piece of example would be too time consuming. So I will have to pass this one to someone else.
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

Priyanshu
Posts: 30
Joined: Wed May 22, 2019 5:48 am

Re: Ranorex not capturing the table data

Post by Priyanshu » Thu Jun 11, 2020 8:53 am

Can someone else help me with this? I am blocked with my automation

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

Re: Ranorex not capturing the table data

Post by odklizec » Thu Jun 11, 2020 9:39 am

Hi,

The question is, do you need to compare entire table or just specific table cells?

A quick&dirty solution of your problem could be storing ref. snapshot of the table in question and then compare all RawText elements from snapshot with actual table. For this you may need to use this xpath, which returns all RawTexts:
/form[@name='SyLaUnderLinFrm']/?/?/element[@name='T1']/rawtext
For an example of comparing tables (using snapshots) see this code examples page:
https://www.ranorex.com/help/latest/han ... -examples/

Of course, you will have to modify these Table-related examples to match your needs. Plus, there is a problem, that the snapshot you posted, contains duplicated RawTexts, just with different bounding rectangles. I'm not sure if there is a way to eliminate duplicated RawTexts? It may be possible by toggling RawText option in settings, but this is something you have to try yourself.

Another possibility, and something I would personally consider in such case, is extracting list of RawTexts and storing them in CSV file, which I would use as a reference file and compare it with actual list obtained from UI (RawTexts obtained in realtime).
Here are some posts regarding saving and comparing CSV files:
https://www.ranorex.com/forum/writing-i ... tml#p34657
https://www.ranorex.com/forum/compare-m ... t9412.html
I'm sure that there is plenty of other posts discussing this topic (but not RawTexts). So search for posts regarding storing elements to file and comparing them.
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