Reputation: 55
I am trying the
driver.findElement(By.xpath("//android.widget.TextView[@text='5']"));
driver.findElement(By.xpath("//android.widget.RadialTimePickerView$RadialPickerTouchHelper[@content-desc='5']"));
driver.findElement(By.xpath("//android.widget.RadialTimePickerView$RadialPickerTouchHelper[@content-desc='5']")).click();
Upvotes: 0
Views: 966
Reputation: 55
driver.findElementByAndroidUIAutomator("UiSelector().className(\"android.widget.RadialTimePickerView$RadialPickerTouchHelper\").instance(2)").click(); Thread.sleep(5000); driver.findElementByAndroidUIAutomator("UiSelector().className(\"android.widget.RadialTimePickerView$RadialPickerTouchHelper\").instance(1)").click();
First link for hour and second for minute for hour: instance 0 means select the 1 hr from watch and instance 1 for select the 2 hr from watch and so on........ for min.:- instance 0 means select the 00 min from watch and instance 1 for select the 0 5min from watch and so on..........
Upvotes: 0
Reputation: 115
You can identify the element using classname, store it in a List and access it using either its index or some attribute.
List <WebElement> allElements = driver.findElements(By.classname("android.widget.RadialTimePickerView$RadialPickerTouchHelper"))
After this, iterate the list and perform the action
Upvotes: 2