【发布时间】:2019-10-13 22:18:50
【问题描述】:
link of location popup image 我正在尝试在 Amazon DeviceFarm 上执行自动化脚本(Appium+Java+TestNG/Junit),但在执行时,脚本无法在位置权限弹出窗口上执行任何操作((访问/拒绝)。Couldn'在控制台中看不到任何错误日志。我使用了正常的 click() 操作以及 alert() 函数。在这种情况下没有任何作用。
请帮助我。下面是我尝试过的一段代码..
WebDriverWait wait = new WebDriverWait(android, 5);
wait.until(ExpectedConditions.alertIsPresent());
driver.switchTo().alert().dismiss();
}catch(Throwable t) {
System.out.println("Not an alert popup or alert is not present..");
driver.findElement(By.id("idofthelocator")).click();
}
【问题讨论】:
标签: cucumber appium aws-device-farm