Appium滑动直到页面底部

直接上代码

boolean isSwipe = true;
String endString = "已加载全部数据";
String endString2 = "没有更多的数据";
// 滑动屏幕直到页面底部
while (isSwipe) {
swipeToUp(androidDriver,200,1);//向上滑动屏幕
String temp =androidDriver.getPageSource();
if(temp.contains(endString) || temp.contains(endString2) )
isSwipe = false;
}

效果如下:



原文地址:https://www.cnblogs.com/Lihao2013/p/6541984.html