For iOS and Android it is possible to use the following to set the AccessibilityIdentifier using code like this:
Forms.ViewInitialized += (object sender, ViewInitializedEventArgs e) => {
// http://developer.xamarin.com/recipes/testcloud/set-accessibilityidentifier-ios/
if (null != e.View.StyleId) {
e.NativeView.AccessibilityIdentifier = e.View.StyleId;
}
};
The above code is taken from:
http://developer.xamarin.com/guides/cross-platform/xamarin-forms/uitest-and-test-cloud/
For Xamarin.Forms.Platform.WinRT.Tablet.Forms there are not any events defined. Is there another approach to use for Universal Apps in order to set the AutomationProperties.AutomationId of visual elements?