Windows - Get list of files in folder (only shows visible)
-
- Posts: 13
- Joined: Wed Nov 20, 2013 4:16 pm
Windows - Get list of files in folder (only shows visible)
<deleted>
Last edited by godzillajoe on Tue Mar 11, 2014 6:44 pm, edited 1 time in total.
Re: Windows - Get list of files in folder (only shows visible)
Hi,
There are no accessible representatives of the not shown elements and this is why Ranorex cannot get them.
You need to scroll the scrollbar to get all your elements.
You can for instance use the "scrollbar[@accessiblename='Vertical Scroll Bar']" element and scroll by using the Set Value -> Value action, you can set it to values from 1 to 100.
I hope this will help you to solve the issue!
Regards,
Markus
There are no accessible representatives of the not shown elements and this is why Ranorex cannot get them.
You need to scroll the scrollbar to get all your elements.
You can for instance use the "scrollbar[@accessiblename='Vertical Scroll Bar']" element and scroll by using the Set Value -> Value action, you can set it to values from 1 to 100.
I hope this will help you to solve the issue!
Regards,
Markus
Re: Windows - Get list of files in folder (only shows visible)
The issue is actually with how Windows loads UI objects.
It uses a method known as "Lazy Loading". This allows the system to use fewer resources because it doesn't have to fetch properties or "draw" items on the UI that are not actually visible. The system knows there is something there, but doesn't need to know anything about it.
And Markus is correct, since Windows doesn't present this information, Ranorex can't get it either.
There are several ways to go about getting all of the objects, but I would guess that Markus's will be the easiest.
It uses a method known as "Lazy Loading". This allows the system to use fewer resources because it doesn't have to fetch properties or "draw" items on the UI that are not actually visible. The system knows there is something there, but doesn't need to know anything about it.
And Markus is correct, since Windows doesn't present this information, Ranorex can't get it either.
There are several ways to go about getting all of the objects, but I would guess that Markus's will be the easiest.
Shortcuts usually aren't...
-
- Posts: 13
- Joined: Wed Nov 20, 2013 4:16 pm
Re: Windows - Get list of files in folder (only shows visible)
I was able to get them all by sending an {END} keypress, getting the text of the selected (last) item, then starting at the top and walking down the list (send key {DOWN}, get the current text, send key {DOWN}....) until I hit the last one again. Stored them all in a list. It works but it is slow and a bit hacky.