Hello
Kindly need your help iam trying to click “OK” in the dialog box ,but it’s not working
Code
Alert alert = driver.switchTo().alert();
alert.accept(); -> not implemented yet
driver.tap(1,134,526,1); -> no thing happen
Thread.sleep(10000);
driver.findElements(By.name(“OK”)).isEmpty() -> no thing happen
Version Appium-1.4.13.dmg
Device: s6 edge
Application Hybrid
I also try
WebElement Result = wd.findElement(By.xpath("//android.app.Dialog[1]/android.widget.Button[1]"));
wd.findElement(By.xpath("//android.app.Dialog[1]/android.widget.Button[1]")).click();
wd.tap(1, wd.findElement(By.xpath("//android.app.Dialog[1]/android.widget.Button[1]")), 10);
but nothing work
use this to click on button or sendKey to editText in Appium.
driver.switchTo().alert();
@Test
public void gotoAlertDialog() {
driver.findElement(AppiumBy.accessibilityId(“App”)).click();
driver.findElement(AppiumBy.accessibilityId(“Alert Dialogs”)).click();
driver.findElement(AppiumBy.accessibilityId(“List dialog”)).click();
driver.switchTo().alert();
driver.findElement(AppiumBy.androidUIAutomator(“new UiSelector().text("Command two")”))
.click();
driver.quit();
}