Describe the bug
When use allControls to locate the controls and call press on it, always the first control is pressed.
To Reproduce
Steps to reproduce the behavior:
Simply use the code in any page with multiple buttons.
const buttonControls = await browser.allControls({
selector: {
controlType: "sap.m.Button",
interaction: "press"
}
})
await buttonControls[1].press()
You will find that the first button is pressed. And also, if you replace press with firePress, the bug will be fixed.
Expected behavior
The second button should be pressed.
Runtime Env (please complete the following information):
wdi5/wdio-ui5-service-version: 3.0.3
UI5 version: any
wdio-version (output of wdio --version): 9.21.1
node-version (output of node --version): 22.17.0
Additional context
I believe this function relocates the controls, causing the loss of index information in the allControls array, which is the cause of this bug.
Describe the bug
When use
allControlsto locate the controls and callpresson it, always the first control is pressed.To Reproduce
Steps to reproduce the behavior:
Simply use the code in any page with multiple buttons.
You will find that the first button is pressed. And also, if you replace
presswithfirePress, the bug will be fixed.Expected behavior
The second button should be pressed.
Runtime Env (please complete the following information):
wdi5/wdio-ui5-service-version: 3.0.3UI5version: anywdio-version (output ofwdio --version): 9.21.1node-version (output ofnode --version): 22.17.0Additional context
I believe this function relocates the controls, causing the loss of index information in the allControls array, which is the cause of this bug.