Xamarin UITest Listview Not Updated On Runtime

Pelin Konaray 291 Reputation points
2020-12-14T14:46:53.877+00:00

I have a uitest where I search client-side in listview. For example, if my listview has 2 items, when I open the page
Automation id of the 1st element: auto_test1,
Automation id of the 2nd element: auto_test2
all 2 items are visible. After entering text in an entry and searching, only the following item appears on the screen:
Automation id of the 2nd element: auto_test2,

Automation ids are not updated after the search. When I look with the repl, there is one item. But automation id of it is automation id of first item.

For example:

My UITest Code:
48292-capture3.png

And I have 2 item on my screen
48302-capture4.png

When I look 1. Repl, I see this:
48200-capture.png

After the search, I look 1 item on screen:
48199-capture1.png

But when I look the second repl, I look it doesn't update:
48245-capture2.png

So I don't control with UITest. I have to test if the search is working correctly. How do I update listview at runtime in uitest?

NOTE: i tried to use image instead of cached image for set automation id. But it doesn't worked.

Xamarin
Xamarin
A Microsoft open-source app platform for building Android and iOS apps with .NET and C#.
5,296 questions
{count} vote