Sendkeys() command doesn't work for Number picker

Hi,
I have tried below 2 ways to scroll and select options from NumberPicker, but neither works. Let me know if there is another way to scroll and select the desired option from numberpicker.

  1. UIAutomator: ((FindsByAndroidUIAutomator) driver).findElementByAndroidUIAutomator(“new UiScrollable(new UiSelector()).scrollIntoView(text(”"+text+""))")-----------> This works for only one option

  2. sendkeys(): driver.findElementByXPath("//android.widget.NumberPicker[@index=‘0’]").sendKeys(“weekly”);

Thanks in advance.

UiAutomator(2) does not support such feature. Try Espresso if you need it

Hi,

Sample example for the above scenario in espresso please.

Thanks in advance

Hi ,

Would appreciate if any help provided for the above scenario.

Thanks.