Skip to content

Fix allControls press() to target specific control with interaction selector#728

Open
iamSmallY wants to merge 5 commits into
ui5-community:mainfrom
iamSmallY:main
Open

Fix allControls press() to target specific control with interaction selector#728
iamSmallY wants to merge 5 commits into
ui5-community:mainfrom
iamSmallY:main

Conversation

@iamSmallY

@iamSmallY iamSmallY commented Jan 21, 2026

Copy link
Copy Markdown

When using allControls with an interaction selector, press() and enterText() always targeted the first matching control instead of the specific indexed control.

const buttons = await browser.allControls({
    selector: {
        controlType: "sap.m.Button",
        interaction: "press"
    }
})
await buttons[1].press()  // Previously pressed buttons[0], now correctly presses buttons[1]

Changes

  • assign domId to the id field of selector before calling _interactWithControl.
  • add test cases for pressing all checkbox with interaction: press.

Fixes #720 .

Notes

  • Wdi5 can not find input control when using the same way to fix enterText. So this pr just fix the press.

@iamSmallY iamSmallY changed the title Fix allControls press() and enterText() to target specific control with interaction selector Fix allControls press() to target specific control with interaction selector Jan 22, 2026
@mauriciolauffer mauriciolauffer self-assigned this May 9, 2026

@mauriciolauffer mauriciolauffer left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Your branch is out-of-date, could you rebase it, please?

Comment thread package-lock.json

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remove this file from your PR, no need to edit package-lock.json here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

The allControls can not work with .press().

3 participants