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?