Osanda Deshan
Osanda Deshan

Reputation: 1559

How to Automate Time Picker on Android 5.0 using Appium Java

I need to automate the Android 5.0 Native Time Picker to select a time parameterized.

Android 5.0 Native Time Picker

I have searched in several threads and blogs, but I can not find a way to do this.

I have tried with this,

androidDriver.findElement(By.name("6")).click();
androidDriver.findElement(By.name("45")).click();

But it will give an error like below.

Error log

Upvotes: 1

Views: 1089

Answers (1)

Osanda Deshan
Osanda Deshan

Reputation: 1559

I have solved this issue by using findElementByAccessibilityId

androidDriver.findElementByAccessibilityId("6").click();

Upvotes: 1

Related Questions