msg-systems / ui5-testrecorder

The tool enables efficient test-automation for SAP UI5 and OpenUI5 applications, by providing you a test-recorder for UI5 with exporting capabilities to uiveri5, testcafe and OPA5.
Apache License 2.0
12 stars 5 forks source link

Closing interaction of MessageStrip not recognized correctly. #47

Open martenAdrian opened 4 years ago

martenAdrian commented 4 years ago

Closing the MessageStrip (Cookie message at the bottom of the page) of the UI5-Documentary page, is not correctly recognized and handled by the UI5-Testrecorder. There are no properties to choose from. The action will not taking place at the application itself.

claushunsen commented 4 years ago

There are no properties to choose from.

The panel 'Properties' is not shown as the element is selected by its UI5 identifier by default, see the screenshot below.

annotation-cookie-strip


The action will not taking place at the application itself.

Nevertheless, saving the test step does not close the message strip as the Press action is performed on the control and not its inherent closing button. For message strips, we likely need to adjust the control identification. In detail, the property path /element/subActionTypes/domChildWith may do the right thing, so that the inherent closing button can be selected.

https://github.com/msg-systems/ui5-testrecorder/blob/cf4204dd4eb947cd08ab98aafada8cb94ecff4cd/scripts/popup/view/TestStep.view.xml#L74-L78

claushunsen commented 4 years ago

I had a look into the source code of the page:

<div id="sdk---app--cookieMessageStrip" data-sap-ui="sdk---app--cookieMessageStrip" data-sap-ui-fastnavgroup="true" data-sap-ui-ms-closable="true" role="note" aria-live="assertive" class="sapMMsgStrip sapMMsgStripInformation sapUiSmallMargin sapUiDemoKitFixedStrip UI5TR_ControlFound">
    <span class="sapUiPseudoInvisibleText">Message Strip Information Closable</span>
    <div class="sapMMsgStripIcon"><span data-sap-ui-icon-content="" role="presentation" aria-hidden="true" id="id-1587729963103-12" aria-label="Information" class="sapUiIcon" style="font-family: 'SAP\2dicons';"></span></div>
    <div class="sapMMsgStripMessage"><span id="__text0" data-sap-ui="__text0" class="sapMText sapUiSelectable sapMTextMaxWidth" style="text-align: left;">We use cookies to improve your experience on our site. By continuing to use this website, you consent to use our cookies.</span><a id="__link0" data-sap-ui="__link0" tabindex="0" href="" aria-labelledby="sdk---app--cookieMessageStrip __link0" class="sapMLnk sapMLnkMaxWidth">Accept</a></div>
    <button title="Close" aria-labelledby="__text14" class="sapMMsgStripCloseButton"></button>
</div>

The problem is that the button does not have a proper UI5 identifier that clarifies its relation to the message strip (e.g., sdk---app--cookieMessageStrip-closeButton). Instead, it has no ID at all...

martenAdrian commented 4 years ago

Currently at Version 1.76, there could be a workaround by providing custom Action Class closing this, MessageStrip.

Within the next release there will be a Button provided as valid UI5 control. This could lead to close this issue.

Therefore we move it to backlog.