Page 1 of 1
Difficulties creating a table from a snapshot
Posted: Wed Nov 02, 2016 8:38 pm
by sfanning
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
Re: Difficulties creating a table from a snapshot
Posted: Thu Nov 03, 2016 9:16 am
by odklizec
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.
Re: Difficulties creating a table from a snapshot
Posted: Thu Nov 03, 2016 3:54 pm
by sfanning
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.
Re: Difficulties creating a table from a snapshot
Posted: Thu Nov 03, 2016 4:40 pm
by odklizec
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.
Re: Difficulties creating a table from a snapshot
Posted: Tue Nov 08, 2016 10:12 pm
by sfanning
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.