This site is in read only mode. Please continue to browse, but replying, likes, and other actions are disabled for now.
1 / 4
Jun 2017

Hello everyone,

I am using "findElementByAndroidUIAutomator" with UiScrollable to scroll items on dropdown but I cannot perform methods of UiScrollable.
I met error of UnsupportedCommandException "The requested resource could not be found, or a request was received using an HTTP method that is not supported by the mapped resource." because I did not know how use it when trying to use "driver.findElementByAndroidUIAutomator("new UiScrollable(new UiSelector()).scrollToEnd(10);");".

Please help me some examples for UiScrollable methods.

Thank you very much.

  • created

    Jun '17
  • last reply

    Nov '17
  • 3

    replies

  • 2.7k

    views

  • 3

    users

  • 1

    like

  • 1

    link

As per my understanding, you can use only those methods of UiScrollable class which accepts object of UiSelector class, few scroll examples are below:-

1) scroll to an element using resource id:-
driver.findElement(MobileBy.AndroidUIAutomator("new UiScrollable(new UiSelector()."
+"scrollable(true)).scrollIntoView(new UiSelector().resourceId("resourceId"))"));

2) scroll to an element using text value:-
driver.findElement(MobileBy.AndroidUIAutomator("new UiScrollable(new UiSelector().scrollable(true))"
+ ".scrollIntoView(new UiSelector().text("textValue"))"));

browse UiSelector, UiScrollable classes of Android sdk for more options

Thanks @in-ishan for your examples.
I need more examples about UiScrollable methods (scrollToEnd, scrollToBeginning). Can you please help me ?

5 months later