Android Appium Scroll UiAutomator ExpandableListView 这个组合会如何运作?

Android Appium Scroll UiAutomator ExpandableListView How will this combination work?

这段代码不适用于 ExpandableListView。

driver.findElementByAndroidUIAutomator("new UiScrollable(new UiSelector().resourceId(\"com.theentertainerme.entertainer:id/ex_listview_locations\")).scrollIntoView(new UiSelector().text(\"Singapore\"))" ); Please see attched screenshot for element hirarchy

任何帮助!我做错了什么?

java-客户端 4.0,appium 1.5.3 同一段代码适用于 listView。

滚动试试下面的代码

Dimension size = driver.manage().window().getSize();
int x = size.width / 2;
int starty = (int) (size.height * 0.5);
int endy = (int) (size.height * 0.1);
driver.swipe(x, starty, x, endy);

如果您想 select 列表中的项目,请查看下面的内容 link - how to click on element in gridview in appium using java