I have successfully set an Accessibility identifier for a UIButton (a custom button that inherits from UIButton), and it shows up in the REPL, however setting it on a another UIButton (another custom button that inherits from UIButton), and also a UILabel fails to show in the REPL.
The accessibility identifiers are set together in the same MvxViewController:
btnLogin.AccessibilityIdentifier = "StartScreenView_LoginButton"; // Secondary button which inherits from UIButton btnSetup.AccessibilityIdentifier = "StartScreenView_SetupButton"; // Primary button which inherits from UIButton versionLabel.AccessibilityIdentifier = "StartScreenView_VersionNumberTextView"; // UILabel
results in the following in the REPL:
You can see that the first button shows an id of "StartScreenView_LoginButton".
However the UILabel that has the following does not show the expected id:
[UILabel] label: "2.4.0 (1)", text: "2.4.0 (1)"
Nor does the other button show an id:
[SecondaryButton] id: "StartScreenView_LoginButton", label: "Already have an account" [UIButtonLabel] label: "Already have an account", text: "Already have an account"
My Xamarin.UITest package has a version of 2.1.3.
It's in a Xamarin.iOS project.