代码行:
driver. findElement(MobileBy.AndroidUIAutomator("new UiScrollable(new UiSelector().scrollable(true).实例(0)).scrollIntoView(new UiSelector().text Con的("5000666").实例(0)");
甚至我也尝试使用下面的代码行滚动到列表的末尾:
driver. findElement(MobileBy.AndroidUIAutomator("new UiScrollable(new UiSelector().scrollable(true)).scrollToEnd(10)");
但这也行不通。有人能在这里提供其他选择吗?
如果我没有错,您需要在字符串中添加一个\
,例如:
\"5000666\"
您的代码行将类似于:
driver.findElement(MobileBy.AndroidUIAutomator("new UiScrollable(new UiSelector().scrollable(true).instance(0)).scrollIntoView(new UiSelector().textContains(\"5000666\").instance(0))"));
试试看会发生什么。
第二行代码我不知道,对不起。