uiautomator icon indicating copy to clipboard operation
uiautomator copied to clipboard

Cannot figure out how to scroll right or left when using 'child_by_text' and there doesn't seem to be support for setAsHorizontalList()

Open brettnolan opened this issue 5 years ago • 0 comments

I need support for the setAsHorizontalList() command for a project I am doing Otherwise, it is not properly scrolling an app screen horizontally when using 'child_by_text'. Does anyone have a fix or a workaround I can use?

I have a number of items on the app screen side by side and I need to scroll the screen to the right to see them all. Unfortunately scrolling with 'child_by_text' defaults to vertical scrolling and I cannot find a way to switch it (would have used setAsHorizontalList).

foundItem = device(resourceIdMatches="*.horizontal_page_list")
.child_by_text("<NAME> - <ID>", allow_scroll_search=True, className="android.widget.RelativeLayout")

Any help would be greatly appreciated.

brettnolan avatar Sep 02 '20 22:09 brettnolan