feat(interactions): add handle alert tool for system alerts and permission dialogs#57
Merged
SrinivasanTarget merged 1 commit intoappium:mainfrom Feb 15, 2026
Conversation
SrinivasanTarget
requested changes
Jan 5, 2026
| } else { | ||
| button = await driver.findElement( | ||
| 'xpath', | ||
| `//android.widget.Button[contains(@text, "${buttonLabel}")]` |
Member
There was a problem hiding this comment.
contains might match multiple elements as well, doesnt look like a concrete solution here
Contributor
Author
There was a problem hiding this comment.
what do u think we can do? @SrinivasanTarget
Contributor
Author
There was a problem hiding this comment.
please check the new behavior and if there are other comments.. @SrinivasanTarget
| const resourceId = resourceIdMap[buttonLabel]; | ||
| if (resourceId) { | ||
| try { | ||
| button = await driver.findElement('id', resourceId); |
Member
There was a problem hiding this comment.
hardcoded resource IDs might not work across all Android versions
f37e426 to
8b0939f
Compare
8b0939f to
46c9181
Compare
saikrishna321
approved these changes
Feb 15, 2026
SrinivasanTarget
approved these changes
Feb 15, 2026
github-actions bot
pushed a commit
that referenced
this pull request
Feb 15, 2026
## [1.15.0](v1.14.0...v1.15.0) (2026-02-15) ### Features * **interactions:** add handle-alert tool ([#57](#57)) ([966d035](966d035))
|
🎉 This PR is included in version 1.15.0 🎉 The release is available on: Your semantic-release bot 📦🚀 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adding a new appium_handle_alert tool for handling system alerts and dialogs on mobile devices.
Features:
mobile: acceptAlert/mobile: dismissAlertfor default actions; for specific button labels, finds elements by text or content-desc in the current page source, then uses generated locators (id, accessibility id, xpath, -android uiautomator, class name) to find and click—no hardcoded resource IDs or XPathsmobile: alertexecute command withactionand optionalbuttonLabelparameterssrc/tools/index.ts