Skip to content

fix(alert): read W3C element id for Android custom button clicks - #491

Merged
KazuCocoa merged 2 commits into
appium:mainfrom
Mochxd:fix/alert-w3c-element-id
Aug 25, 2026
Merged

fix(alert): read W3C element id for Android custom button clicks#491
KazuCocoa merged 2 commits into
appium:mainfrom
Mochxd:fix/alert-w3c-element-id

Conversation

@Mochxd

@Mochxd Mochxd commented Aug 24, 2026

Copy link
Copy Markdown
Contributor

On remote Android sessions, findElement returns the W3C element payload { 'element-6066-11e4-a52e-4f735466cecf': '…' }. The custom buttonLabel path still used button.ELEMENT || button, so elementClick received the whole object instead of the string id.

Use readWebElementId (same helper as appium_find_element and appium_active_element) and fail clearly when no id is present. Tests now assert the id passed to elementClick for both W3C and legacy ELEMENT shapes.

@KazuCocoa
KazuCocoa merged commit 3500517 into appium:main Aug 25, 2026
5 checks passed
github-actions Bot pushed a commit that referenced this pull request Aug 25, 2026
## [1.92.6](v1.92.5...v1.92.6) (2026-08-25)

### Bug Fixes

* **alert:** read W3C element id for Android custom button clicks ([#491](#491)) ([3500517](3500517))
@github-actions

Copy link
Copy Markdown

🎉 This PR is included in version 1.92.6 🎉

The release is available on:

Your semantic-release bot 📦🚀

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

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants