您的位置:首页 > 移动开发

appium对手势密码的处理

2016-06-07 11:22 274 查看
使用TouchAction类实现滑动

button = self.findelements(u'手势按钮')

touch = TouchAction(self.driver)

touch.press(el=button[0]).move_to(el=button[1]).move_to(el=button[2]).move_to(el=button[5]).release().perform()

当然也可以直接使用坐标实现

TouchAction(self.driver).press(x=260*m,y=720*n).wait(100)\

.move_to(x=280*m,y=0).wait(100)\

.move_to(x=280*m,y=0).wait(100)\

.move_to(x=0,y=280*n).release().perform()

注意:move_to里的坐标是相对于前一个坐标的偏移量
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: