[Android 10] accept_alert dismisses the alert instead.
See original GitHub issueThe problem
alert.accept
dismisses the alert instead of accepting it on Android 10, however, on older versions, it accepts the alert properly.
Environment
- Appium version: 1.15.1
- Desktop OS/version used to run Appium: MacOS 10.15.2
- Mobile platform/version under test: Android 10
- Real device or emulator/simulator: Real Device
Details
I am handling Location permissions pop-up with alerts. After switching to the alert, I expect alert.accept
to tap on allowing the permission. However, the statement results in rejecting permission (Deny).
Link to Appium logs
Code To Reproduce Issue [ Good To Have ]
alert = driver.switch_to.alert
alert.accept
Issue Analytics
- State:
- Created 4 years ago
- Comments:5
Top Results From Across the Web
how to handle alerts in android using appium - Stack Overflow
Appium comes with a default capability to accept, dismiss alerts capabilities.SetCapability("autoAcceptAlerts", true); capabilities.
Read more >Why does an alert sometimes appear to come back after I ...
When an alert publisher sends an update to an existing alert Google Now will show a Public Alerts card with the new content...
Read more >acceptAlert | API Reference - Nightwatch.js
acceptAlert (). Accepts the currently displayed alert dialog. Usually, this is equivalent to clicking on the 'OK' button in the dialog.
Read more >How to handle PopUps and Alerts in Selenium with examples?
3rd Step: Prompt alert box opens where the user can enter text in the text box. After entering user can accept or dismiss...
Read more >WebDriverIO Tutorial: Handling Alerts & Overlay In Selenium
alert ().accept() selenium java. It helps users to click on the 'OK' button on Alert pop up. Syntax: browser.acceptAlert();.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
The change has been published to appium@beta
Yes, that’s also what I was wondering about, because of the variation in how alert appears like the number of buttons. I will use the label to resolve this in my own code. Thank you!