I’d leave that as the last resort if all else fails. Timings would be difficult to get right (click slow enough that the UI has time to scroll down but fast enough that it’s not snail-paced).
If what I’ve written below will work, you won’t need to scroll at all, just remember to use SimulateClick or SendWindowMessage method in the Click.
This will be a theory based description, as I don’t have access to that application, but let’s try.
I’ll be using this page as the base - https://en.wikipedia.org/wiki/Table_(information)
- Use FindElement activity to find the table container.
Launch UiExplorer and inspect the elements on that page.
You should be able to find something like this (assuming it really is a table):
In that picture the TABLE tag is the table container, while the TR tags hold the rows. In your application it might be a DIV tag or something else, but either way you want to find the closest common parent for all rows.
You might start with indicating the row element and moving up in hierarchy until you find something suitable.
Build a good selector for the table container element and use it as a selector in FindElement activity. In this example it will be as simple as what UiExplorer suggested, but it might differ in your application.
Store the found element in some variable, I’ve called it containerElement.
- Use FindChildren activity to get all rows from it.
This is the configuraion of FindChildren I’ve used for this example:
You want to put the containerElement as the Target -> Element (since it should look for things nested under it).
Filter is a common property for all things you want to find. In this case it’s simply web controls tagged TR. This you need to inspect with UiExplorer as well, as it probably will be different.
Scope is set to FIND_DESCENDANTS.
There are 2 choices that might be relevant here (other being FIND_CHILDREN). Difference is that CHILDREN are only direct (1st level nesting). In that page that would only cover CAPTION and TBODY elements. DESCENDANTS is everything that is nested under it, no matter how deep. Since we need 2nd level nesting, we need to use that.
Now you have a IEnumerable(Of UiElement) which you can use in a ForEach loop. Rest should be pretty easy
Attached you can find an example that does a little more (reads the cells, builds a datatable etc.) that could also prove useful. If you just need to click each row, put your Click activity where the example is reading cells.
DataTableTest.xaml (16.7 KB)
Sidenote - the example skips 1 row, that’s specific to that table, since the header row is a TR as well.
If you’re stuck with any of the steps, try to find relevant materials in the Resources section and/or ask away.