Forum Xamarin.Forms
We are excited to announce that the Xamarin Forums are moving to the new Microsoft Q&A experience. Q&A is the home for technical questions and answers at across all products at Microsoft now including Xamarin!

We encourage you to head over to Microsoft Q&A for .NET for posting new questions and get involved today.

Unique page identifier Windows

bogdan.kliukbogdan.kliuk UAMember
edited December 2016 in Xamarin.Forms

Need to add some element that uniquely identifies every page for automation tests. I thought about adding AutomationId to ContentPage like

<ContentPage xmlns="" xmlns:x="" x:Class="XamlSamples.HelloXamlPage" AutomationId="TestID"> </ContentPage>

It works for Android and IOS. But windows doesn't show this element. Is there a way to force element appearing on specific platform?
If NO - is there any thought about other unique identifier?


  • ClintStLaurentClintStLaurent USUniversity ✭✭✭✭✭


    Can't you use the normal x:Name="pgMyCoolPageName" that already exists?
    This would keep things working the the Xamarin UI Automated test system... Or is it Microsoft Mobile Command Center... Or whatever they call it now for doing automated UI testing across multiple platforms.

    If your system makes use of the same paradigm as existing system it saves you a lot of headaches.

  • bogdan.kliukbogdan.kliuk UAMember

    Windows isn't supported by test cloud yet and this is first priority right now for me. also adding this attribute hasn't changed anything. any other thoughts?

  • bogdan.kliukbogdan.kliuk UAMember

    as I believe Windows doesn't show elements that don't have any info to show even if they are part of structure. is there a way to change this?

  • Question is still valid

Sign In or Register to comment.