Difficulties creating a table from a snapshot

Ask general questions here.
sfanning
Posts: 3
Joined: Wed Nov 02, 2016 8:23 pm

Difficulties creating a table from a snapshot

Post by sfanning » Wed Nov 02, 2016 8:38 pm

Hi,

I am attempting to do some data validation on a Telerik grid using the method that Ranorex has made publicly available (Validate_TableContentEqual). The problem that I am having is that I cannot create a table using the snapshot I have taken. I have provided the snapshot I took in hope that someone can tell me what my issue might be (I am assuming that it is not the code provided). Any help is greatly appreciated!

Thanks,
Sam
Attachments
PartitionedValueSnapshot.rar
(277.51 KiB) Downloaded 36 times

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

Re: Difficulties creating a table from a snapshot

Post by odklizec » Thu Nov 03, 2016 9:16 am

Hi,

At first, the snapshot says that you are using UIA wpf plugin and that the identification capabilities for this element are limited. So you should try native WPF plugin instead (WPFOnly or WPFPreferred option in Ranorex settings).

At second, it seems you are using Ranorex 5.4.4, which is too old and no longer supported. Try to reproduce your problem with latest 6.1.1.

And finally, I'm afraid, I don't have a clue what exactly is your problem? Could you please elaborate what exactly you want to achieve and what exactly does not work? Please provide as much details as possible (sample solution, source code, etc...). Thanks.
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

sfanning
Posts: 3
Joined: Wed Nov 02, 2016 8:23 pm

Re: Difficulties creating a table from a snapshot

Post by sfanning » Thu Nov 03, 2016 3:54 pm

Sorry I was not clear enough. The code I am using I pulled from the Ranorex code examples page. Since I am not able to post URLs with this account, I have attached the code. The issue that I am presented with is that I need to use a Ranorex snapshot with this code in order to create a reference table for validation. I have taken a snapshot (attached in OP), however I am unable to create a table from the snapshot. The failure occurs in the block of code beginning at line 25.

Is creating a table from a snapshot a capability that is not present in 5.4.4? If not, I will attempt another method (we are still awaiting approval to upgrade to 6.1.1). If yes, I will try using the plugin settings you have recommended, though I was told early on that I should avoid using the WPFOnly/WPFPreferred options for the particular application I am testing. I have not bothered to verify that claim, so now is as good a time as any. Thanks for the help.
Attachments
ValidateTable.txt
(3.53 KiB) Downloaded 33 times

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

Re: Difficulties creating a table from a snapshot

Post by odklizec » Thu Nov 03, 2016 4:40 pm

OK, I think the problem is not with the code, but with your snapshot! If you open it, it ends at "PART_GridViewVirtualizingPanel" element, which is not a Table element. So try to create another snapshot, this time with Table as a root element ;)

On the other hand, the table looks incompatible with the Ranorex sample code, so it may not work as expected. Definitely not without some modifications. You should definitely try the native WPFPreferred/Only option and also latest Ranorex 6.1.1.
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

sfanning
Posts: 3
Joined: Wed Nov 02, 2016 8:23 pm

Re: Difficulties creating a table from a snapshot

Post by sfanning » Tue Nov 08, 2016 10:12 pm

OK, I see what you are saying, thanks. It seems we are upgrading to 6.1.1 soon, so I'll give it a go then. For now, I've just used a data binding, which I think might be a better solution overall because I am interested in specific cells of data only, and I suspect it would take longer to validate the entire table object rather than only the cells of data I am keen on. Cheers.