Not finding element and clicking in UiScrollable

Hi,

I am doing automation in appium and I have following line where it should find button and click but it’s not finding and keep on scrolling up and down and then giving error saying element not found. I verified with inspect element and element is existing with give text.

Where e.getkey() = “activity_tab_education_calories_btn”

((AndroidDriver) driver).findElementByAndroidUIAutomator(“new UiScrollable(new UiSelector().scrollable(true).instance(0)).scrollIntoView(new UiSelector().resourceId(”" + e.getKey() + “”).instance(0))");

Any idea what’s wrong with this?

many things can be wrong. try first guide -> http://appium.io/docs/en/writing-running-appium/tutorial/swipe-tutorial/

Thanks @Aleksei I will take a look. Thanks for quick support.