New Alert Dialog before app launch stops automation

Hello,

I’ve spent the last couple hours trying to find a solution to the problem that I just started having.
Recently in our app we started asking access to the contacts. However, the problem is that the dialog appears before anything else loads and it seems like appium cannot read it (I tried using inspector and nothing loads until I MANUALLY accept that dialog).
So far I’ve tried following:

  1. setting in DC: autoAcceptAlerts = true
  2. wait {find_element(:name, “OK”).click}
  3. wait {alert_accept}

Has anyone had this issue?

Do you using JAVA or Python?

@iRANG_QA
I am writing my code in Ruby.

@Liudas
Can you try? driver.switch_to.alert and then try to accept it.

I wonder if it’s similar or the same as the Notification dialog error documented here: https://github.com/appium/appium/issues/4178

Tried the following:

  1. switch_to.alert - nothing
  2. asked developers to put that popup (contacts access dialog) after the initial load screen. Now the dialog loads after the initial app screen is loaded, appium can actually detects, but there is no way I can accept it, I’ve tried the following:
    2.1 accept_alert
    2.2 alert.accept
    2.3 find_element(:name, “OK”).click

I am out of ideas…

if OK button is there then can you find that button element and try to click on that? without use of ALERT.

Any news on this? I’m using ruby too and facing the same issue.

can u suggest me i am also facing problem not able to click on OK of an alert hybrid app’s appium testing