Is it possible to add an id property to each tab of the TabStrip for automation testing?
Thanks,
Jason Li
1 Answer, 1 is accepted
1
Accepted
Konstantin Dikov
Telerik team
answered on 21 Jul 2023, 03:48 PM
Hi Jason,
Thank you for reaching out to us.
Currently the TabStripTab does not have an option for setting an "id" property. All of the available properties of the Tab component can be found in the following help topic:
What we can suggest as a solution is to get reference to the TabStripTab after the initialization of the TabStrip with JavaScript (within React.useEffect) and manually add the "id" attribute to the elements. You can use the "k-tabstrip-items" class name of the parent UL element of the tabs as main selector and then get the Tab elements with "k-item" class.
I'm trying to assign the id to the Kendo Menu component using the solution from above but I'm not getting the element property from the current reference. Please help, thanks! Here is the partial code: