Skip to main content
Microsoft Idea

Power BI

Needs Votes

Add slicer's name to css-selector as an attribute for appropriate slicer in its generated HTML code.

Vote (1) Share
Igor Bugayev's profile image

Igor Bugayev on 17 Nov 2020 03:14:10

I'm working on a robotic process automation (RPA) of some Power BI web reports using UiPath platform.
The issue I'm currently dealing with is: the report has multiple data slicers displayed as multi-select dropdown lists, and all of them have the option of displaying "Select all" item set to "on", so this option is used in all three slicers. When UiPath tries to interact with appropriate checkboxes in the dropdowns using css-selectors, the HTLM paths for these "Select all" options in all three slicers appear to look the same, what makes a confusion for correct recognition. To avoid this, UiPath tries to distinguish them generating an additional "idx='(integer_value)'" attribute for every matching css-selector. However, the dynamically generated idx value appears to be different from session to session for the same slicer, and is not reliable to use it in programming.
My question is: how difficult would be to add a name of slicer (i.e. name of appropriate data field, for example) as an additional attribute in appropriate css-selector? That could provide a reliable hook for developers to use it in the code.
I think it would be enough if the new attribute will be added to CSS class “slicerBody”, which already has an attribute named “role=’listbox’”. The attribute can be named as “slicerName” or “slicerTitle”, or somehow else. The main idea is: it should reflect the data list name.