_From @vaadin-bot on December 1, 2015 11:24_
Originally by _mvysny2_
Instead of finding menu items by caption, I would consider adding a support for menu items to have developer-defined string ID, and changing the API to looking up menu items by this ID. This also helps if the application may be localized, which causes menu items to different captions based on locale.
This would also solve https://dev.vaadin.com/ticket/16874
Imported from https://dev.vaadin.com/ issue #19327
_Copied from original issue: vaadin/testbench#799_
_From @vaadin-bot on December 1, 2015 13:5_
Originally by @Legioth
Depends on #3653 in the framework.
Hi, any news about this problem?
Hello there!
It looks like this issue hasn't progressed lately. There are so many issues that we just can't deal them all within a reasonable timeframe.
There are a couple of things you could help to get things rolling on this issue (this is an automated message, so expect that some of these are already in use):
Thanks again for your contributions! Even though we haven't been able to get this issue fixed, we hope you to report your findings and enhancement ideas in the future too!
In our application we use FontIcons in front of the actual captions in the MenuItems. So it is even harder to identify those by captions. Would also very much like to see the ability to set IDs for the items inside the MenuBarElement.
Moreover it would be useful if we could add/remove stylenames as in button component.
Hello there!
We are sorry that this issue hasn't progressed lately. We are prioritizing issues by severity and the number of customers we expect are experiencing this and haven't gotten around to fix this issue yet.
There are a couple of things you could help to get things rolling on this issue (this is an automated message, so expect that some of these are already in use):
Thanks again for your contributions! Even though we haven't been able to get this issue fixed, we hope you to report your findings and enhancement ideas in the future too!
Please do not stale this ... I think the suggestion to also add and remove stylenames might be good too.
I think @Artur- was right labeling this as a bug. I just rold our customers "no problem you get the ID for automated UI tests in a second" and then realize that it is not supported. Realy? This is a bug not an enhancement.
From Vaadin 8.12.1: if you set the MenuBar id, say "my-menu", the menu items will have generated id's "my-menu-1", "my-menu-2", ...
Most helpful comment
In our application we use FontIcons in front of the actual captions in the MenuItems. So it is even harder to identify those by captions. Would also very much like to see the ability to set IDs for the items inside the MenuBarElement.