左滑手势(引导页的左滑手势)
double x = driver.manage().window().getSize().getWidth();//x的值为安卓设备的宽
double y = driver.manage().window().getSize().getHeight();//y的值为安卓设备的高
for (int i=0;i<5;i++)//有时左滑手势不行,故多循环了几次
{
driver.swipe((int)(x0.9), (int)(y0.8), (int)(x0.1), (int)(y0.8), 100);左滑手势
}
左滑手势(某个页面对某个列表元素进行删除操作)
x = driver.findElementById("com.ku0571.kuyou:id/view_content").getSize().getWidth();
y = driver.findElementById("com.ku0571.kuyou:id/view_content").getSize().getHeight();
double y1 = driver.findElementByClassName("android.widget.RelativeLayout").getSize().getHeight();
driver.swipe((int)(x0.9), (int)(y1+y0.5), (int)(x0.1), (int)(y1+y0.5), 100);
driver.findElementById("com.ku0571.kuyou:id/delete").click();