Diyon
1
Problem: Inside RecyclerView there were a lot of Relative layouts
so how can I make scrolling up?
MobileElement element = (MobileElement) driver.findElement(MobileBy.AndroidUIAutomator(
"new UiScrollable(new UiSelector().scrollable(true).instance(0))" +
".scrollIntoView(new UiSelector().text(\"exact_text\"))"));
There is no exact texttext(“exact_text”) at relative layout and image appear random. How can I try? please give me any solution!!
not clear what problem? it does not start scrolling with your code example?
read also http://appium.io/docs/en/writing-running-appium/tutorial/swipe-tutorial/ - many other ways.
Diyon
3
How to scroll recycler view (inside recycler view >> too many relative layouts)
scrollIntoView(new UiSelector().text(\"exact_text\"))"));
I can’t find with exact text because Ads listing image appear randomly.
Diyon
4
Here my code but it doesn’t work
// driver.findElement(MobileBy.AndroidUIAutomator(“new UiScrollable(new UiSelector().resourceIdMatches(”.*:com.onekyat.app:id/recycler_view").scrollable(true)).flingToEnd(10)"));
//driver.findElement(MobileBy.AndroidUIAutomator("new UiScrollable(new UiSelector().scrollable(true))" + ".scrollIntoView(new UiSelector().resourceIdMatches(\".*:com.onekyat.app:id/recycler_view\"))"));
//driver.findElement(MobileBy.AndroidUIAutomator("new UiScrollable(new UiSelector().resourceIdMatches(\"com.onekyat.app:id/recycler_view\").scrollable(true)).scrollForward(3)"));
nothing works with UiScrollable -> switch swipe by x,y
1 Like