Page 1 of 1

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

Posted: Fri Apr 17, 2015 5:45 am
by jayam_jp22
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

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

Posted: Fri Apr 17, 2015 6:46 am
by odklizec
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

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

Posted: Fri Apr 17, 2015 7:17 am
by jayam_jp22
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

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

Posted: Fri Apr 17, 2015 9:05 am
by odklizec
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?

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

Posted: Mon Apr 20, 2015 12:00 pm
by Support Team
Hi all,

Please try to enable the "Realize Items in Virtualizing Containers" within the global settings:
GlobalPluginSettings.png
Regards,
Robert