UiObject lockpattern = mDevice.findObject(new UiSelector().resourceId("your_company_lockscreen_pattern_view_string"));
Rect pattern = lockpattern.getBounds();
//分析了一下就是left就+100,right就-100,bottom-100,top+100
Point point1 = new Point(pattern.left+100,pattern.bottom-100);
Point point2 = new Point(pattern.right-100,pattern.bottom-100);
Point point3 = new Point(pattern.right-100,pattern.top+100);
Point[] point = {point1,point2,point3};
mDevice.swipe(point,20);
Android Uiautomator设置滑动解锁
于 2024-07-25 21:27:08 首次发布