Hi,
I am performing a web testing using appium java-client-5.0.0-BETA1. I want to select a date in my test case. When I click on the date icon a date picker appears where user can select appropriate date. This date picker is not the part of my web page. I inspected the element with UI Automator Viewer and extracted the correct xpath but still getting No Such Element Exception.
Appium Version - 5.0.0-BETA1
OS : Android 4.4.2
Device : Samsung Galaxy Tab
Below is the code I am using
AppiumDriver driver = null;
DesiredCapabilities capabilities = null;
capabilities = DesiredCapabilities.android();
capabilities.setCapability(MobileCapabilityType.PLATFORM, Platform.ANDROID);
capabilities.setCapability(MobileCapabilityType.DEVICE_NAME, "GalaxyTab");
capabilities.setCapability(MobileCapabilityType.VERSION, "4.4.2");
capabilities.setBrowserName("Chrome");
capabilities.setCapability(MobileCapabilityType.NEW_COMMAND_TIMEOUT, 300);
driver = new AndroidDriver(new URL("http://127.0.0.1:4723/wd/hub"),capabilities);
driver.get("URL");
driver.findElement(By.id("selectDate")).click(); driver.findElement(By.xpath("//android.widget.FrameLayout/android.widget.Button[@text='Set']")).click();
Please help me to make this work.
Screen -