Having problem on date picker in android

Appium version: 1.4.0.0
OS: Windows 7
I’m using Java for automation with Appium (io.appium.java_client.AppiumDriver)

I having problem when select date in date picker
i got error “org.openqa.selenium.NoSuchElementException”

i have tried flowing code.
driver.findElement(By.xpath("//android.widget.LinearLayout")).sendKeys(“4”);
WebElement _pickerWheel = driver.findElement(By.xpath(“android.widget.DatePicker”));
_pickerWheel.sendKeys(“4”);

Can you try clicking on “4” instead of sending the text to it.
However, you will need to come up with various combination of strategy to handle this scenario as there would be different type of date selector for different android versions.

i tried using
driver.findElement(By.xpath("//android.view.View[@bounds=’[115,681][605,750]’]")).click();

Can you upload the UiAutomator dump so i can have a look.

The Numbers are inside a view, because of that it cannot identify then uniquly. When you are tring to click “4” but passing its container view, appium gets the element and clicks on the center of the element which happens to be the location on 7. Thats why its selecting 7.

In this situation there is no direct way to get this done. The only way i see is get the element by image comparision refer here

is it possible to use tap by coordinates?

Yes Thats what the Sikuli driver will do envetually. However if you are trying to provided it by yourself it will not work for long because the position of the date will change very drastically unless you have some way to calculate it dynamically.

how to use tap by location and scroll without using Sikuli driver?
do you have sample code?

Here’s the sample