monkeyrunner脚本编写
来源:互联网 发布:爱卓金蝶erp软件 编辑:程序博客网 时间:2024/05/17 07:54
直接贴源码吧,主要就是进入APP内的消息发送页面,然后编写文本点击发送。
再通过monkeyrunner test.py执行,test.py即为编写的脚本。
#!/usr/bin/env python#coding:utf-8from com.android.monkeyrunner import MonkeyRunner,MonkeyDevice,MonkeyImage#连接设备device=MonkeyRunner.waitForConnection(3,"850ABM5SRXVQ")#启动APPdevice.startActivity("com.wuba/com.wuba.home.activity.HomeActivity")MonkeyRunner.sleep(2)#点击消息中心device.touch(850,1850,"DOWN_AND_UP")MonkeyRunner.sleep(3)#点击回话device.touch(500,800,"DOWN_AND_UP")MonkeyRunner.sleep(2)#点击输入框device.touch(500,1850,"DOWN_AND_UP")MonkeyRunner.sleep(3)#输入某词testdevice.type("test")MonkeyRunner.sleep(2)#点击回车device.press('KEYCODE_ENTER','DOWN_AND_UP')MonkeyRunner.sleep(2)#点击发送device.touch(1000,1150,"DOWN_AND_UP")MonkeyRunner.sleep(1)#截图image = device.takeSnapshot()image.writeToFile("./test.png","png")
0 0
- MonkeyRunner脚本编写
- monkeyrunner脚本编写
- Android MonkeyRunner脚本编写技巧
- 使用java编写monkeyrunner脚本
- 【MonkeyRunner】eclipse中编写monkeyrunner脚本环境搭建
- Android自动化测试之Monkeyrunner 脚本编写
- Monkeyrunner基于python编写脚本通用方法
- Android自动化测试之Monkeyrunner 脚本编写
- monkeyrunner脚本的编写、运行和常用api简介
- 第3章1节《MonkeyRunner源码剖析》脚本编写示例: MonkeyRunner API使用示例(原创)
- monkeyrunner 录制脚本
- Monkeyrunner 录制脚本&回放
- monkeyrunner写阴阳师脚本
- Monkeyrunner 脚本使用
- monkeyrunner脚本实践
- MonkeyRunner_android 自动化脚本轻松编写, monkeyrunner easy api高级用法及封装库
- 第3章2节《MonkeyRunner源码剖析》脚本编写示例: MonkeyDevice API使用示例(原创)
- 第3章3节《MonkeyRunner源码剖析》脚本编写示例: MonkeyImage API使用示例(原创)
- Tomcat 启动两次的问题(ServletContextListener的contextInitialized被执行两次的问题)
- Android 打造炫目的圆形菜单 秒秒钟高仿建行圆形菜单
- tune2fs 命令
- (Eclipse:15978): GLib-GIO-CRITICAL **: g_dbus_connection_get_unique_name: assertion 'G_IS_DBUS_CONNE
- 【centos7】添加开机启动服务/脚本
- monkeyrunner脚本编写
- HDFS读写文件流程
- Android学习笔记之Bitmap位图虽触摸点移动
- Design库-TabLayout属性详解
- Android中的自定义属性和组合式控件
- Oralce11g修改字符集
- Android 自定义RecyclerView 实现真正的Gallery效果
- python断言(assert) 与 __debug__
- Android 6.0 相关问题