How do I define element id for test automation in my Xamarin Forms application?

asked 2021-04-20T10:22:19.327+00:00
Hamittirpan 166 Reputation points

Hi everyone !

I am developing an application with Xamarin Forms In order to be able to define and access an element separately in the xaml automation test, an id definition must be made. I think I can use automationId and styleId for this.

First of all, I added different automationId's to each control. I didn't use styleId. But I could not see the element id in the automation test and elements can only be accessed with xpath. Automation tests were tried to be done with android apk.

What should I do to solve this problem?

Waiting for your valuable comments and suggestions xamarin family.

Thanks in Advance !


A Microsoft open-source app platform for building Android and iOS apps with .NET and C#.
4,803 questions
{count} votes