Hi Friends,
I’m facing issue in tapping on the system alerts(OS) alerts in android of native app
I have tried with
- driver.switchTo().alert();
- capabilities.setCapability(“autoAcceptAlerts”,true);
-
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.
We can use xpath. I’m able to click using xpath
Ex:
driver.findElement(By.xpath(“cdshvkdfjk”)).click();
Any driver.findElement strategy seems to be working
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
You can try:
capabilities.setCapability(“autoGrantPermissions”,true);
1 Like
Hi,
If you are using python as your client then in desired capabilities , you can use in this way
autoGrantPermissions = True
basically it is desired capability
Hi ,
I used the following capabilities in my appium code but still my location pop is not disappearing.
caps.setCapability(“enablePerformanceLogging”, true);
caps.setCapability(“autoGrantPermissions”,true);
caps.setCapability(“extendedDebugging”, true);
caps.setCapability(“locationContextEnabled”, true);
caps.setCapability(“autoAcceptAlerts”, “true”);
caps.setCapability(“locationServicesAuthorized”, false)