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里的坐标是相对于前一个坐标的偏移量
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里的坐标是相对于前一个坐标的偏移量
相关文章推荐
- android 使用handler 与postDelayed时注意项
- android应用中为按键添加声音
- Cocos2dx v3.10 pageview addeventlistener不起作用
- Android Fragment使用(二) 嵌套Fragments (Nested Fragments) 的使用及常见错误
- Android 弹出系统日历,添加提醒事件
- Material Design设计规范
- Android_数据存储
- android studio 自定义注释模板
- android基础之onActivityResult不执行问题
- 判断是否是从微信中打开的浏览器
- iOS开发拓展篇—封装音频文件播放工具类
- Android实现自定义带文字和图片的Button
- [置顶] Android开发之Sensors与摇一摇
- [置顶] java微信退款unexpected end of file from server
- android BroadcastReceiver 使用小结
- Android按钮单击事件的四种常用写法总结
- Android Studio官方版DrawerLayout侧滑菜单解析
- Android自定义View实现左右滑动选择出生年份
- 工具类
- IOS碰撞动画(降落动画)