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="http://xamarin.com/schemas/2014/forms" xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml" 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?

Posts

  • ClintStLaurentClintStLaurent USUniversity ✭✭✭✭✭

    @bogdan.kliuk

    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.