Skip to content

The allControls can not work with .press(). #720

@iamSmallY

Description

@iamSmallY

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.

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions