It would help me with my testing mostly.
===
ADMIN EDIT
You may also want to vote for and follow this request for adding Id property to all components
https://feedback.telerik.com/blazor/1495842-add-id-parameter-on-all-blazor-components
If you need this attribute for testing only, you may find interesting this request: https://feedback.telerik.com/blazor/1513117-translators-for-selenium-testing-for-the-telerik-ui-for-blazor-components. If so, Vote for it and Follow it so we can know there is interest, and so you can get status updates.
===
Hi.
I just wanted to note that `ButtonGroupToggleButton` components also expose an `Id` property, because they inherit from `ButtonBase`, but it doesn't seem to be implemented because the rendered HTML doesn't include the expected `id` attribute.
Hi Philip,
The ID was added to the Button due to internal refactoring, but the grid command buttons do not implement it yet, even though they inherit the property and you see it in the intellisense.
At this point, adding a custom Class is the best option I can offer for identifying command buttons in the grid for your tests. Once an ID parameter gets implemented it should be relatively easy to switch to that if you extract that comparison logic for buttons in a method.
Regards,
Marin Bratanov
Progress Telerik
Five days of Blazor, Angular, React, and Xamarin experts live-coding on twitch.tv/CodeItLive, special prizes, and more, for FREE?! Register now for DevReach 2.0(20).
To add a small clarification - if this does get exposed for command buttons, it is likely that the developer would be responsible for ensuring it is unique, as each button would get repeated for each row. This also applies for reusing components and when you have more than one instance of the same component on the same page - you will need to have unique IDs on all rendered elements across the entire HTML page.
Regards,
Marin Bratanov
Progress Telerik