On Android, the Picker control is represented by an EditText view when closed.
When opened, it is replaced by a group of views that do not have an id or semantic properties. This makes it really difficult to use with UI tests.
Steps to Reproduce
Create a File > New .NET MAUI App
Add a Picker like so:
<Picker Title="My picker"
SemanticProperties.Description="This is the semantic properties description for the Picker"
SemanticProperties.Hint="This is the semantic properties hint for the Picker">
<Picker.ItemsSource>
<x:Array Type="{x:Type x:String}">
<x:String>A</x:String>
<x:String>B</x:String>
<x:String>C</x:String>
</x:Array>
</Picker.ItemsSource>
</Picker>
Inspect the app using Appium with platformName = Android and appium:automationName = UiAutomator2
Tap the picker so that the options A, B, C show up
Expected outcome: the Picker popup elements (A, B and C) can be found in Appium using a proper method of selection.
Actual outcome: the Picker popup is represented by views that are "anonymous" as seen below
Description
On Android, the
Picker
control is represented by anEditText
view when closed. When opened, it is replaced by a group of views that do not have an id or semantic properties. This makes it really difficult to use with UI tests.Steps to Reproduce
Picker
like so:platformName
=Android
andappium:automationName
=UiAutomator2
Expected outcome: the
Picker
popup elements (A, B and C) can be found in Appium using a proper method of selection. Actual outcome: thePicker
popup is represented by views that are "anonymous" as seen belowLink to public reproduction project repository
https://github.com/hansmbakker/PickerAccessibilityBugRepro
Version with bug
8.0.0-preview.6.8686
Last version that worked well
Unknown/Other
Affected platforms
Android
Affected platform versions
Android API level 33
Did you find any workaround?
No response
Relevant log output
No response