Skip to content

Commit caad9ea

Browse files
authored
Merge pull request #24 from maggialejandro/fix/accept-alert-button-selector
Fix acceptAlertButtonSelector matching 'Don't Allow' instead of 'Allow'
2 parents b01ce7d + 2f5d899 commit caad9ea

2 files changed

Lines changed: 2 additions & 1 deletion

File tree

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
99

1010
### Fixed
1111
- `runFlow: when` conditions with variable expressions (e.g., `${output.element.id}`) were never expanded, causing conditions to always evaluate as false and silently skip conditional blocks
12+
- iOS real device: `acceptAlertButtonSelector` matched "Don't Allow" instead of "Allow" — `CONTAINS[c] 'Allow'` matched both buttons, causing WDA to reject permission dialogs. Changed to `BEGINSWITH[c] 'Allow'` with `OK` fallback for older iOS versions
1213

1314
## [1.0.7] - 2026-02-20
1415

pkg/driver/wda/commands.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -751,7 +751,7 @@ func (d *Driver) launchApp(step *flow.LaunchAppStep) *core.CommandResult {
751751
"waitForIdleTimeout": 0,
752752
}
753753
if d.alertAction == "accept" {
754-
sessionSettings["acceptAlertButtonSelector"] = "**/XCUIElementTypeButton[`label CONTAINS[c] 'Allow'`]"
754+
sessionSettings["acceptAlertButtonSelector"] = "**/XCUIElementTypeButton[`label BEGINSWITH[c] 'Allow' OR label ==[c] 'OK'`]"
755755
} else if d.alertAction == "dismiss" {
756756
sessionSettings["dismissAlertButtonSelector"] = "**/XCUIElementTypeButton[`label CONTAINS[c] 'Don't Allow' OR label CONTAINS[c] 'Dont Allow'`]"
757757
}

0 commit comments

Comments
 (0)