How to handle system pop-up in native app android


#1

Hi Friends,

I’m facing issue in tapping on the system alerts(OS) alerts in android of native app

I have tried with

  1. driver.switchTo().alert();
  2. capabilities.setCapability(“autoAcceptAlerts”,true);
  3. WebDriverWait wait = new WebDriverWait(driver,30);
     wait.until(ExpectedConditions.alertIsPresent());
     Alert alert = driver.switchTo().alert();
     alert.accept();
    

still I’m unable to tap or click on it

For reference please find the aatached screenshot

Please help me friends in resolving this issue

Thank you.


#2

We can use xpath. I’m able to click using xpath

Ex:
driver.findElement(By.xpath(“cdshvkdfjk”)).click();


#3

Any driver.findElement strategy seems to be working


#4

I was trying to work with alert method but it’s not working. So finally tried with xpath and was able to click on system alert.

Telmo if you any ideas please help me.

Thank you


#5

You can try:
capabilities.setCapability(“autoGrantPermissions”,true);