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

I’m running my app on an Android device and trying to scroll down to a particular element in a list that is currently not visible and click it.
This issue I have encountered is that when I scroll on the app, the page elements do not refresh and so makes it impossible to click the now visible element.
Please see below the before and after views of scrolling
Before scroll

!

After scroll

!

I have tried the following:
AndroidElement el = driver.FindElement(MobileBy.AndroidUIAutomator(“new UiScrollable(new UiSelector()).scrollIntoView(resourceId(“change-password-link”));”));
// tap element
el.Click();

But I get the following error:
System.InvalidOperationException: no such element (An element could not be located on the page using the given search parameters (ANDROID_UIAUTOMATOR=‘new UiScrollable(new UiSelector()).scrollIntoView(resourceId(“change-password-link”));’)) .

Has anyone else encountered this problem and if so how did you overcome it?

  • created

    Nov '18
  • last reply

    Nov '18
  • 1

    reply

  • 189

    views

  • 2

    users

  • 2

    links

  • Did you check the behaviour with appium desktop ? After scroll down, can Appium Desktop is able to view new element ?

  • After scroll add 1 or 2 sec wait till backend gives back new info, use charles to see what’s happening with backend once you scroll down

  • I would also suggest to try out arc to play with app in interactive mode

    read 10. Elements Locator Strategy >>> Method 2: ( Appium Ruby Console ) <<< in below blog

    https://vikramviknowledgesharing.wordpress.com/2017/01/01/appium-mobile-automation/2

  • Also as a suggestion check out https://github.com/vikramvi/AppiumSerenityPOC3 which shows usage of Serenity BDD framework with Appium to invest time in automating new test case rather than maintaining framework.