Closed Ilian-Allaf closed 1 week ago
Hello @Ilian-Allaf ,
The automationId
doesn't exist as property of the MenuItem
.
Could you please provide a snippet with your use case in order to determine if it's supported or not?
Regards, Plamen Ivanov
The data-automation-id attribute is a mandatory attribute in order to assign hotspots in web assistant + is used for automation purpose including the parsing of translation in the Rigi tool. Being unable to inject this attribute on some elements put us out of SAP development standard & best practices.
This is considered High priority on SBPA product.
Hello @amaillard-sap ,
As automationId
is not something we officially support, can you use the native
You can use the native API setAttribute('automationId', 'test id')
as shown in this snippet.
Can you confirm if this is sufficient solution for you ?
Regards, Plamen Ivanov
We do not need to use the native API, we can directly set the data-automation-id on the web component, the problem is that this property on the ui5-menu-item is not transfered to the created ui5-li in the static area which is actually what the users see on their screen. We need a way to have a unique information transfered from the web component that we create (the ui5-menu-item) to the element that is dsplayed (here the ui5-li).
note: I am surprised that this does not come as a global requirement, we are just following the SAP guidelines & best practices, not doing some kind of crazy custom stuff :)
Hi @Ilian-Allaf, @amaillard-sap,
Could you please check the following comment of @vladitasev in https://github.com/SAP/ui5-webcomponents/issues/7722 and if it will work for you? Seems like similar request.
BR, Nayden
Hi @nnaydenow,
I do not understand exactly what should be done based on the comment you linked.
I tried to use 'stable-dom-ref' on this stack blitz > https://stackblitz.com/edit/js-gq2yq1?file=index.js,index.html but I do not see any effect; can you assist us here ?
Thanks
Hi @amaillard-sap,
I've prepared example with ui5-select: https://stackblitz.com/edit/js-jpva1i?file=index.js,index.html,package.json but it will required a downport for the Menu component. Could you please check if this will work for you and if yes, I'll prepare a downport?
Hi @nnaydenow,
I cannot say whether or not the companion / webassistant will be able to identify the select entry with this information, but this surely goes in the good direction :)
Hello, everyone! The issue has been inactive for 21 days. If there are still questions or comments, please feel free to continue the discussion. Inactive issues will be closed after 7 days!
Hello, everyone! The issue has been inactive for 28 days, so I am closing the issue.
Bug Description
When adding automationId to MenuItem, the property don't appear on the DOM element.
Affected Component
MenuItem
Expected Behaviour
No response
Isolated Example
No response
Steps to Reproduce
Log Output, Stack Trace or Screenshots
No response
Priority
None
UI5 Web Components Version
1.24.0
Browser
Chrome
Operating System
No response
Additional Context
No response
Organization
SAP
Declaration