How to identify all hidden list items under a list in WPF

Technology specific object identification, supported applications, web technologies, and 3rd party controls.
jayam_jp22
Posts: 7
Joined: Tue Sep 21, 2010 8:02 am

How to identify all hidden list items under a list in WPF

Post by jayam_jp22 » Fri Apr 17, 2015 5:45 am

Hi Ranorex Team,

I have an issue in our WPF Application, on identifying all the list items (Active+hidden under) in a list box (See List box under Controls on the right side of Attachment). I have attached the snapshot of the same for your reference in both AUT & objects identified using Spy.

The contains 146 list items, which are hidded & are accessible by scrolling down. Even if i scroll down the list i'm not getting all the List items at once. It maximum identified only 76 list items at once. Because of this to identify the list, i had to scroll up / down & it consumes a lot of time for Text Execution.

Note: We have a different module in same WPF application, where the same list items are displayed in Table format. In this case all the 146 items are getting identified properly.

Can you please check & help me out in getting all the objects identified at once?

Thanks
Jayaprakash R
Attachments
List ItemsView.rxsnp
Ranorex Snapshot
(583.51 KiB) Downloaded 75 times
Controls.png
WPF AUT
Controls.png (110.13 KiB) Viewed 2117 times
Objects by Spy.png
List View using Ranorex
Objects by Spy.png (187.8 KiB) Viewed 2117 times
Last edited by jayam_jp22 on Fri Apr 17, 2015 7:14 am, edited 1 time in total.

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

Re: How to identify all hidden list items under a list in WPF

Post by odklizec » Fri Apr 17, 2015 6:46 am

Hi,

Could you please post the Ranorex snapshot of the list in question (not screenshot)?

In general, your list seems to be lazy loaded so I'm afraid, you will have to implement some code to scroll through the list and pick all list items one by one. This has been discussed few times in the past, so try to use "Search" and look for "lazy loaded". Hope this helps?

PS: This particular discussion might help...
http://www.ranorex.com/forum/click-on-h ... t3377.html
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

jayam_jp22
Posts: 7
Joined: Tue Sep 21, 2010 8:02 am

Re: How to identify all hidden list items under a list in WPF

Post by jayam_jp22 » Fri Apr 17, 2015 7:17 am

Hi,

Thanks for the information.

I have just attached the Ranorex Snapshot as well for your reference.

Could please check for the same & let me know, if there is anything else, that can be done to solve this issue.

Thanks
Jayaprakash R

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

Re: How to identify all hidden list items under a list in WPF

Post by odklizec » Fri Apr 17, 2015 9:05 am

Thanks for the snapshot. The bad news is, that there seems to be no attribute containing the total number of elements in the list (sum of loaded and not yet loaded list items). This would make the coding a bit harder. Any chance you could asks the developers to implement/enable this attribute, so you can use it for automation?

Also, you might try to enable/disable some Ranorex WPF plugin settings? I don't know much about WPF, but I'm sure Ranorex folks can assists you with them? Maybe some of them can enable more details in WPF controls?
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
Support Team
Site Admin
Site Admin
Posts: 11709
Joined: Fri Jul 07, 2006 4:30 pm
Location: Graz, Austria

Re: How to identify all hidden list items under a list in WPF

Post by Support Team » Mon Apr 20, 2015 12:00 pm

Hi all,

Please try to enable the "Realize Items in Virtualizing Containers" within the global settings:
GlobalPluginSettings.png
GlobalPluginSettings.png (28.64 KiB) Viewed 2086 times
Regards,
Robert
.
Image