ui5-community / wdi5

official UI5 end-to-end test framework for UI5 web-apps. wdi5 = Webdriver.IO + UI5 Test API
https://ui5-community.github.io/wdi5/
Apache License 2.0
102 stars 43 forks source link

Two sap.m.Text controls have the same _domId #627

Closed vkiykouskaya closed 1 month ago

vkiykouskaya commented 3 months ago

Describe the bug I have an end-to-end test for getting the texts of all sap.m.Text controls inside the sap.suite.ui.commons.networkgraph.Graph control. I do it using the according selector and browser.allControls function, and then perform SAPUI5 function getText on every control found: Selector Function image

On the UI side, the graph looks the following way:

Subsets2

I expect to get an array ["=", "RELATIVE"], but sometimes the result of test execution is the array ["=", "="], which is not correct. After debugging, I found out that in case when I get the ["=", "="] array, the _domId properties of these two texts are the same. In the cases when the array is correct, _domId properties of both texts are unique and coincide with metadata.id property. Please have a look at the following cases with screenshots:

Case 1 - texts array is ["=", "="] - wrong behaviour First text's _domIdand metadata.id are equal to '__text33-__list7-__clone236-application-forensicLab-display-component---workspaceDetails--graph-0-0' - it is expected.

Screenshot 2024-07-12 103905

Second text's _domId and metadata.id are different: _domId is '__text33-__list7-__clone236-application-forensicLab-display-component---workspaceDetails--graph-0-0' - same as for the first text, it is not expected, metadata.id is '__text33-__list7-__clone236-application-forensicLab-display-component---workspaceDetails--graph-1-0':

Screenshot 2024-07-12 104100

So I expect both _domId and metadata.id for the second text to be '__text33-__list7-__clone236-application-forensicLab-display-component---workspaceDetails--graph-1-0'. But actually they are different.

And as a result I get the following array of texts:

Screenshot 2024-07-12 104613

Case 2 - texts array is ["=", "RELATIVE"] - correct behaviour First text's _domIdand metadata.id are equal to '__text33-__list7-__clone236-application-forensicLab-display-component---workspaceDetails--graph-0-0' - it is expected.

Screenshot 2024-07-12 110737

Second text's _domIdand metadata.id are equal to '__text33-__list7-__clone236-application-forensicLab-display-component---workspaceDetails--graph-1-0' - it is also expected.

Screenshot 2024-07-12 110919

And as a result I get the following array of texts:

Screenshot 2024-07-12 111116

I want to emphasize, that for both cases the texts of the text controls in the UI are the same. I find it erroneous that in some cases the _domId of the second text equals to the _domId of the first text. Thus second text's text equals to the text of the first text. What is more, the result of the execution is unstable: sometimes the ids are correct, sometimes they are not. I think it is a wdi5 bug.

Runtime Env:

github-actions[bot] commented 2 months ago

hey 👋 - silence for 30 days 🤐 ... anybody? 😀

github-actions[bot] commented 1 month ago

closed 📴 because silencio 🤫 since an additional 14 days after staleness 📠