本文介绍了在 Appium 中点击权限提醒的允许按钮后无法点击链接?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我正在使用 Appium 自动化一个 Android 应用程序.我面临的问题是它在点击联系人访问权限的允许按钮后不执行任何操作,如下图所示:
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 :
我已经尝试过以下代码:
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");
}
我是 Appium 的新手.我怎样才能找到丢失的东西?
I'm newbie in Appium. How can I find the missing thing?
推荐答案
我可以通过设置以下功能来处理弹出窗口:
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.
这篇关于在 Appium 中点击权限提醒的允许按钮后无法点击链接?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!