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
{{ message }}
This repository was archived by the owner on Feb 25, 2026. It is now read-only.
Repository navigation
This repository was archived by the owner on Feb 25, 2026. It is now read-only.
Expander control doesn't project Automation ID correctly in UI Automation tree #3502
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: )
changed the title [-]Expander control doesn't project Automation ID correctly[/-][+]Expander control doesn't project Automation ID correctly in UI Automation tree[/+]on Sep 27, 2020
Activity
jamesmcroft commentedon Sep 26, 2020
Looking into sorting this by the way. The problem is the lack of an
AutomationPeer.[-]Expander control doesn't project Automation ID correctly[/-][+]Expander control doesn't project Automation ID correctly in UI Automation tree[/+]michael-hawker commentedon Sep 29, 2020
Thanks @jamesmcroft for finding these issues and taking a look at them! Much appreciated. 🦙❤
I've assigned it to you for tracking.
Added automation peer class for expander (#3504)