Unable to tap the link after tap on Allow button of permission alert in Appium? Code Answer

Hello Developer, Hope you guys are doing great. Today at Tutorial Guruji Official website, we are sharing the answer of Unable to tap the link after tap on Allow button of permission alert in Appium? without wasting too much if your time.

The question is published on by Tutorial Guruji team.

I’m automating an Android App using Appium. The issue I’m facing is it doesn’t perform any action after tabbing on allow button of Contact Access Permission as shown in below Image :

enter image description here

I’ve tried below code for the same :

@Test
public void doLogin()
{

    driver.findElement(By.id("com.rawalinfocom.rcontact:id/text_next")).click();
    // Clicks on Allow Button
    driver.findElement(By.id("com.android.packageinstaller:id/permission_allow_button")).click();
    // Clicks on Skip link
    driver.findElement(By.id("com.rawalinfocom.rcontact:id/text_skip")).click();
    driver.findElement(By.id("com.rawalinfocom.rcontact:id/checkbox_terms_conditions")).click();
    driver.findElement(By.id("com.rawalinfocom.rcontact:id/button_get_started")).click();
    driver.findElement(By.id("com.rawalinfocom.rcontact:id/input_number")).sendKeys("9422307801");
    driver.findElement(By.id("com.rawalinfocom.rcontact:id/button_submit")).click();
    driver.findElement(By.id("com.rawalinfocom.rcontact:id/input_enter_password")).sendKeys("1234");
    driver.findElement(By.id("com.rawalinfocom.rcontact:id/button_login")).click();
    System.out.print("Login Success");
}

I’m newbie in Appium. How can I find the missing thing?

Answer

I’m able to handle the popup by setting up below capabilities :

capabilities.setCapability("autoGrantPermissions", "true");
capabilities.setCapability("autoAcceptAlerts", "true");

In this case it doesn’t show the popup the permission set always granted.

We are here to answer your question about Unable to tap the link after tap on Allow button of permission alert in Appium? - If you find the proper solution, please don't forgot to share this with your team members.

Related Posts

Tutorial Guruji