You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
AutomationID in ToolBarItem maps to content-desc instead of resource-id on Android.
Preface as discussed in related issue #4714 the automation will no longer be mapped to content-desc but to resource-id.
This is true for most elements, but not for ToolbarItems, where the AutomationID still maps to content-desc
e.g.
this XAML, <ContentPage.ToolbarItems> <ToolbarItem Text="Filter" Command="{Binding ToggleFilter}" AutomationId="Btn_ToggleFilter" /> <ToolbarItem Text="Search" Command="{Binding ToggleSearch}" AutomationId="Btn_ToggleSearch" /> </ContentPage.ToolbarItems>
results in the following Android Layout, with the AutomationID in content-desc.
<androidx.appcompat.widget.LinearLayoutCompat index="2" package="com.adresys.angel.angelapp" class="androidx.appcompat.widget.LinearLayoutCompat" text="" checkable="false" checked="false" clickable="false" enabled="true" focusable="false" focused="false" long-clickable="false" password="false" scrollable="false" selected="false" bounds="[613,107][1080,275]" displayed="true"> <android.widget.Button index="0" package="com.adresys.angel.angelapp" class="android.widget.Button" text="" content-desc="Btn_ToggleFilter" checkable="false" checked="false" clickable="true" enabled="true" focusable="true" focused="false" long-clickable="false" password="false" scrollable="false" selected="false" bounds="[613,119][757,263]" displayed="true" /> <android.widget.Button index="1" package="com.adresys.angel.angelapp" class="android.widget.Button" text="Search" content-desc="Btn_ToggleSearch" checkable="false" checked="false" clickable="true" enabled="true" focusable="true" focused="false" long-clickable="false" password="false" scrollable="false" selected="false" bounds="[757,119][936,263]" displayed="true" /> </androidx.appcompat.widget.LinearLayoutCompat>
My wish would be for it to be consistent. We spent quite some time to transition all tools, tests and
Steps to Reproduce
Create a page in your Maui App.
Add ToolbarItems to your page.
Add AutomationId to ToolbarItem.
Deploy to Android.
Check with UiAutomator (e.g. via Appium)
Link to public reproduction project repository
No response
Version with bug
8.0.40 SR5
Is this a regression from previous behavior?
Yes, this used to work in Xamarin.Forms
Last version that worked well
No response
Affected platforms
Android
Affected platform versions
No response
Did you find any workaround?
No response
Relevant log output
The text was updated successfully, but these errors were encountered:
Description
AutomationID in ToolBarItem maps to content-desc instead of resource-id on Android.
Preface as discussed in related issue #4714 the automation will no longer be mapped to content-desc but to resource-id.
This is true for most elements, but not for ToolbarItems, where the AutomationID still maps to content-desc
e.g.
this XAML,
<ContentPage.ToolbarItems> <ToolbarItem Text="Filter" Command="{Binding ToggleFilter}" AutomationId="Btn_ToggleFilter" /> <ToolbarItem Text="Search" Command="{Binding ToggleSearch}" AutomationId="Btn_ToggleSearch" /> </ContentPage.ToolbarItems>
results in the following Android Layout, with the AutomationID in content-desc.
<androidx.appcompat.widget.LinearLayoutCompat index="2" package="com.adresys.angel.angelapp" class="androidx.appcompat.widget.LinearLayoutCompat" text="" checkable="false" checked="false" clickable="false" enabled="true" focusable="false" focused="false" long-clickable="false" password="false" scrollable="false" selected="false" bounds="[613,107][1080,275]" displayed="true"> <android.widget.Button index="0" package="com.adresys.angel.angelapp" class="android.widget.Button" text="" content-desc="Btn_ToggleFilter" checkable="false" checked="false" clickable="true" enabled="true" focusable="true" focused="false" long-clickable="false" password="false" scrollable="false" selected="false" bounds="[613,119][757,263]" displayed="true" /> <android.widget.Button index="1" package="com.adresys.angel.angelapp" class="android.widget.Button" text="Search" content-desc="Btn_ToggleSearch" checkable="false" checked="false" clickable="true" enabled="true" focusable="true" focused="false" long-clickable="false" password="false" scrollable="false" selected="false" bounds="[757,119][936,263]" displayed="true" /> </androidx.appcompat.widget.LinearLayoutCompat>
My wish would be for it to be consistent. We spent quite some time to transition all tools, tests and
Steps to Reproduce
Create a page in your Maui App.
Add ToolbarItems to your page.
Add AutomationId to ToolbarItem.
Deploy to Android.
Check with UiAutomator (e.g. via Appium)
Link to public reproduction project repository
No response
Version with bug
8.0.40 SR5
Is this a regression from previous behavior?
Yes, this used to work in Xamarin.Forms
Last version that worked well
No response
Affected platforms
Android
Affected platform versions
No response
Did you find any workaround?
No response
Relevant log output
The text was updated successfully, but these errors were encountered: