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:
On the UI side, the graph looks the following way:
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.
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':
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:
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.
Second text's _domIdand metadata.id are equal to '__text33-__list7-__clone236-application-forensicLab-display-component---workspaceDetails--graph-1-0' - it is also expected.
And as a result I get the following array of texts:
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.
Describe the bug I have an end-to-end test for getting the texts of all
sap.m.Text
controls inside thesap.suite.ui.commons.networkgraph.Graph
control. I do it using the according selector andbrowser.allControls
function, and then perform SAPUI5 functiongetText
on every control found:On the UI side, the graph looks the following way:
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 withmetadata.id
property. Please have a look at the following cases with screenshots:Case 1 - texts array is ["=", "="] - wrong behaviour First text's
_domId
andmetadata.id
are equal to'__text33-__list7-__clone236-application-forensicLab-display-component---workspaceDetails--graph-0-0'
- it is expected.Second text's
_domId
andmetadata.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'
:So I expect both
_domId
andmetadata.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:
Case 2 - texts array is ["=", "RELATIVE"] - correct behaviour First text's
_domId
andmetadata.id
are equal to'__text33-__list7-__clone236-application-forensicLab-display-component---workspaceDetails--graph-0-0'
- it is expected.Second text's
_domId
andmetadata.id
are equal to'__text33-__list7-__clone236-application-forensicLab-display-component---workspaceDetails--graph-1-0'
- it is also expected.And as a result I get the following array of texts:
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:
wdi5/wdio-ui5-service
-version: 2.0.6UI5
version: 1.96.25wdio
-version (output ofwdio --version
): 8.34.1node
-version (output ofnode --version
): v18.16.0