Closed dominikfeininger closed 3 years ago
Hi @dominikfeininger ,
As per the documentation(https://sapui5.hana.ondemand.com/#/api/sap.ui.test.RecordReplay%23methods/sap.ui.test.RecordReplay.findControlSelectorByDOMElement) the method returns the 'best' result with the least possible inspection, which in your case is the trigger. Maybe will be better to use another method or update the selector.
Best regards, Martin
Hi @Martotko, thanks. Do you have any recommendations for an 'updated' selector which delivers the expected result?
hi @Martotko,
if you look at the selector https://github.com/js-soft/wdi5/blob/issue/listgrowing/test/ui5-app/webapp/test/e2e/aggregation.test.js#L39, this becomes more of a problem:
the selector explicitly sets sap.m.List
as desired controlType
;
but handed the list id PeopleListGrowing
, sap.ui.test.RecordReplay.findDOMElementByControlSelector
returns a sap.m.CustomListItem
instead.
Please kindly have another look at the matter.
Thanks,
Volker
Hello @vobu ,
Thank you for sharing this finding. I've created an internal incident 2080456636. The status of the issue will be updated here in GitHub.
Regards, Martin
Hi Dominik,
the method findDOMElementByControlSelector returns a DOM element, not a control. You can modify the result and get the list DOM reference by adding interaction: "root"
Lists have a special handling to make clicking on them (their trigger item) easier and a click is the most expected action, so the dafault state is intended.
Regards, Tsvetelina
confirmed! undocumented gem š š @dominikfeininger please close
A sap.m.List displays the paging footer correctly when "growing=true" and "growingThreshold=3" is set. But the
sap.ui.test.RecordReplay.findDOMElementByControlSelector
method returns wrong control for asap.m.List
with these properties.OpenUI5 version: 1.85
Browser/version (+device/version): Chrome on Mac Version 87.0.4280.88
Any other tested browsers/devices(OK/FAIL): None
URL (minimal example if possible): https://github.com/js-soft/wdi5/blob/74c5c9eec7a8178c32bb5fd684d90d7724bf960b/test/ui5-app/webapp/test/e2e/aggregation.test.js#L36
User/password (if required and possible - do not post any confidential information here):
Steps to reproduce the problem:
findControlSelectorByDOMElement
function on asap.m.List
...-trigger
What is the expected result? The retuned control is the sap.m.List control
What happens instead? The retuned control is the trigger
Any other information? (attach screenshot if possible)