How to scroll without using touch actions

Can any body help me for scroll without using touch actions in ruby with selenium .

As far as I can tell, using TouchAction is best practice. Why do you want to avoid it?

We have requirement . without using TouchAction.

@Veena_MB without touch

using UiScrollable you can scroll till the element you want.


"new UiScrollable(new UiSelector().resourceId(“”)).scrollIntoView(new UiSelector().text("Movies in Gujarati “));”);

I tried this
find_element(:uiautomator, ‘new UiScrollable(new UiSelector().scrollable(true).instance(0)).scrollIntoView(new UiSelector().text(“WebView”).instance(0));’)

getting error as shown bellow
An element could not be located on the page using the given search parameters. (Selenium::WebDriver::Error::NoSuchElementError)
NoSuchElementError: An element could not be located on the page using the given search parameters.
at AndroidDriver.helpers.findElOrEls (/usr/local/lib/node_modules/appium/node_modules/appium-android-driver/lib/commands/find.js:75:11)

@Veena_MB in your code you trying to scroll into element with text “WebView”. Do you see such text on screen?

yes text is “WebView”

Sometimes it could be a problem:

  1. when we have several scrollView on one screen. In such case you need add some scollView element e.g. id to uiscrollable
  2. you can add direction to scoll. Check uiscrollable object

Can anyone help me how to scroll to exact element in iOS? (java language)

Looks like you may be going through Rahul Shetty’s Udemy course. I’m doing the same and here’s the code I used to scroll to the specific “Web Views” object:
driver.findElementByAndroidUIAutomator("new UiScrollable(new UiSelector()).scrollIntoView(text(\"WebView\"));");