Windowscommunitytoolkit: Expander control doesn't project Automation ID correctly in UI Automation tree

Created on 26 Sep 2020  ·  3Comments  ·  Source: windows-toolkit/WindowsCommunityToolkit

Describe the bug

A clear and concise description of what the bug is.

When providing an Automation ID to the Expander control in XAML, it cannot be referenced by that ID within a UI test.

Tooling to read the UI suggests that the Expander button shown is the control's root and this has a preset automation ID of PART_ExpanderToggleButton provided by the button's name.

This makes it difficult to reference a specific Expander within a UI test, particularly when there is potential for more than 1 on a page.

  • [ ] Is this bug a regression in the toolkit? If so, what toolkit version did you last see it work:

Environment

NuGet Package(s): 

- Uwp.UI.Controls

Package Version(s): 

- 6.1.1

Windows 10 Build Number:
- [ ] Fall Creators Update (16299)
- [ ] April 2018 Update (17134)
- [ ] October 2018 Update (17763)
- [ ] May 2019 Update (18362)
- [x] May 2020 Update (19041)
- [ ] Insider Build (build number: )

App min and target version:
- [ ] Fall Creators Update (16299)
- [ ] April 2018 Update (17134)
- [x] October 2018 Update (17763)
- [ ] May 2019 Update (18362)
- [ ] May 2020 Update (19041)
- [ ] Insider Build (xxxxx)

Device form factor:
- [x] Desktop
- [ ] Xbox
- [ ] Surface Hub
- [ ] IoT

Visual Studio 
- [ ] 2017 (version: )
- [x] 2019 (version: 16.7.4) 
- [ ] 2019 Preview (version: )

Completed accessibility bug testing

All 3 comments

Hello jamesmcroft, thank you for opening an issue with us!

I have automatically added a "needs triage" label to help get things started. Our team will analyze and investigate the issue, and escalate it to the relevant team if possible. Other community members may also look into the issue and provide feedback 🙌

Looking into sorting this by the way. The problem is the lack of an AutomationPeer.

Thanks @jamesmcroft for finding these issues and taking a look at them! Much appreciated. 🦙❤

I've assigned it to you for tracking.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

alvinashcraft picture alvinashcraft  ·  3Comments

kusanagi2k2 picture kusanagi2k2  ·  4Comments

IanStorm picture IanStorm  ·  4Comments

andriihorpenko picture andriihorpenko  ·  3Comments

deltakosh picture deltakosh  ·  3Comments