Hello,
Does anyone know how to add domId to an individual button on the menu component for automated testing?
thanks in advance!
Hello,
Does anyone know how to add domId to an individual button on the menu component for automated testing?
thanks in advance!
I believe you are able to add the domID to any component.
Scroll down to the meta section.
click add meta property.
Hover over properties.
Click domID
Thanks Noah but I think the issue here is each individual button in the component cannot be uniquely IDed.
Do you have any advice for that challenge?
You are not able to add an HTML id
attribute to individual items of a Menu Tree. If you're using version 8.1.34 or newer, you can target individual items by text with [data-label="MyItemText"]
This of course assumes that item text is unique among all items in the Menu Tree. You can provide a bit more to the locator in order to specify sub-menu items if needed...
Sub-menu item:
div.submenu-group [data-label="MyItemText"]
Or, you could use the libraries we provide for automated testing of Perspective content: GitHub - inductiveautomation/ignition-automation-tools
Thank you cmallonee