FindAll does not get all ChildO Objects in List
I need to scroll to an element present in table for WPF application, the value is dynamically provided during run time.
I have below code which runs fine for small listview as scrollbar moves correctly but does not scroll to elements nearing end of long list.
My list is as below and I scroll using names ( A1, A2 ) etc
A1 1 3
A2 1 5
S1 1 3
Q2 1 5
Z7 1 3
Z82 1 5
Z9 1 3
Public Module Main
Dim _desktop As Desktop = Agent.Desktop
Public Sub Main()
Dim iPosition As Double = 0.5
Dim iSumPosition As Double = 0.0
Dim sObjlocator As String = "//WPFListView[@automationId='MyListView']"
Dim sData As String = "Z118"
Dim sObjSublocator As String = "//WPFToggleButton[@caption='*']"
Dim rows As IList = _desktop.WPFListView(sObjlocator).FindAll(sObjSublocator)
Dim sObjExist As Boolean = False
For Each row As WPFToggleButton In rows
Dim sString As String = row.Text
Console.WriteLine(sString) ' <--names
If Trim(sString) = sData Then
sObjExist = True
iSumPosition += iPosition
Console.WriteLine(iSumPosition) ' <--Position
Issue: In output below A1 , A10 etc from Console.WriteLine(sString) and numbers from Console.WriteLine(iSumPosition) ,it works for few objects not in screen and scrollbar moves vertically down but If my list is large and I need scroll many times then I face issue.
Scroll bar does not scroll to end for names nearing end of list, if my list is very small then it scrolls down to very last element as well.
In Debug mode I see rows list (Dim rows As IList = _desktop.WPFListView(sObjlocator).FindAll(sObjSublocator)) does not have value (names) for elements nearing end of list.
In output below ,we can see names & positions are printed initially but in end(for long list) only positions are printed.
Any suggestions will be appreciated
WPF pre-fill forms settings is : yes