Debug ID for tab component?

Is it possible to give debug id for each tab within tabsheet?

At least it is possible to give it to the content layout of the tab, like for every other component, with setDebugId(String). I don’t think that you can put one into the tab indicator in the tab bar, if it is that that you mean.

If you open up a bit more one what you are doing then maybe I can give some more pointers.

I’ve been testing my Vaadin app with Robot Framework and I’m trying to locate tab element by its id so that I can refer to it without having to specify component location by xPath. Tests shouldn’t be binded to current layout because it may change. Instead I’m making sure that every UI component has an debug id which I refer to in my test suites.

How the
Vaadin TestBench
(commercial product) does this is by “anchoring” the path to the closest Vaadin widget with a debug id and then constructing the path inside it in terms of Vaadin components (as far as possible) and possibly in terms of the DOM elements (after the “leaf component”, if necessary). Tabs are handled with their indices within a TabSheet, and there are custom locators in use for several Vaadin components and their sub-components to make tests more stable in the case of UI changes, version upgrades etc.

I’m just testing TestBench , quite impressive :).

Anyway i can’t understand the best way to select a Tab “By Name” to automate testing in case Tab are dinamically added to a TabSheet.

Any hint?

Thank you