![](https://img-blog.csdnimg.cn/20201014180756923.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
MonkeyRunner
天涯飘雪
aaa
展开
-
MR_在eclipse下执行monkey runner脚本
说实在话,本人有点懒,不想每次都在cmd下切换到android sdk的tools目录下执行原创 2014-10-19 21:30:16 · 1694 阅读 · 0 评论 -
MonekyRunner_Android UI Automation with Python
Read firstIn Continuation to my previous post "Ui Automation on Android Basics"Setup Environment for Android UI Automation with Python- Download Eclipse from http://www.eclipse.org/downloads/转载 2012-09-24 14:13:38 · 1148 阅读 · 0 评论 -
MonkeyRunner_Click on a View contains specified text using monkeyrunner and Android ViewClient
I'm trying to simulate a click on an Android tablet using monkey runner and Android ViewClient. I want to click on a region/ view which has specific text. Here's an example of what i'm trying to do:转载 2012-09-24 18:01:00 · 1657 阅读 · 2 评论 -
MonkeyRunner_android 自动化脚本轻松编写, monkeyrunner easy api高级用法及封装库
python library, it's used for android ui automation testing. but it's can be exported to java language.python 语言库, 用于andorid ui自动化. 此库依赖于monkeyrunner的执行环境. wrapEasyMonkey库 ( monkeyrunner与view交互的库封转载 2012-10-08 13:41:37 · 3115 阅读 · 1 评论 -
MonkeyRunner_EasyMonkeyDevice
com.android.monkeyrunner.easy源码下载地址:http://source-android.frandroid.com/sdk/monkeyrunner/src/com/android/monkeyrunner/easy/README# 代码文件:contacts.py# 导入要用到的代码库from com.android.monkeyrunner impo转载 2012-09-28 23:04:15 · 3351 阅读 · 1 评论 -
MonkeyRunner_wrapEasyMonkey howto入门教程1.0
从名字你就能看出, 这个库是对easyMonkeyDevice的封装.(该文档仅适用于wrapEasyMonkey 1.0 Copyright(c) whoistester.com)使用该库主要目的,1. 将monkeyDevice 与 easyMonkeyDevice统一封装到库2. 进行自动化操作时, 增加对异常处理,防止异常退出 (例如 当某textview未显示出来时,转载 2012-10-08 14:16:17 · 2753 阅读 · 5 评论 -
MonkeyRunner_Importing from PYTHONPATH
In previous post we analyzed what is needed to develop, run and debugmonkeyrunner scripts usingEclipse andPyDev.#! /usr/bin/env monkeyrunner'''Created on Sep 10, 2012@author: diego'''impo转载 2012-09-29 10:51:48 · 1180 阅读 · 0 评论 -
MonkeyRunner_monkeyrunner: testing views properties
There are several questions floating around, like this one instackoverflow, about how some view properties could be obtained from a monkeyrunner script or putting the question in more general term转载 2012-09-28 15:36:28 · 933 阅读 · 0 评论 -
MonkeyRunner_monkeyrunner: interacting with the Views
The time may come when you want your tests to interact with theApplication Under Test (AUT) in a more clever way than just guessing the View's coordinates on the screen and sending the events.转载 2012-09-28 15:47:10 · 975 阅读 · 0 评论 -
MonkeyRunner_Examples(1)
# Imports the monkeyrunner modules used by this programfrom com.android.monkeyrunner import MonkeyRunner, MonkeyDevice# Connects to the current device, returning a MonkeyDevice objectdevice =原创 2012-02-17 16:00:43 · 984 阅读 · 0 评论 -
MonkeyRunner_Testing app example(1)
今天终于实现了用monkeyrunner点击应用程序中view的id,下面为源代码:#-*-coding:utf-8 -*-from com.android.monkeyrunner import MonkeyRunner, MonkeyDevice from com.android.monkeyrunner.easy import EasyMonkeyDevice, By原创 2012-09-26 23:13:49 · 1264 阅读 · 2 评论 -
MonkeyRunner_MonkeyRunner知识点总结
知识点一:Monkeyrunner为Andriod SDK 嫡亲的工具,功能还是很强大的,但Andriod的测试技术发展比较晚,所以目前国内的教程和例子比较少,很多功能没有发掘出来。大多数人可能遇到的几个问题。 1. 点击button,选择输入焦点,只能靠坐标来定位,一旦换,坐标完全失效了。解决方案1: 通过device.getProperty("display.width"),devic原创 2012-08-12 12:19:35 · 1849 阅读 · 3 评论 -
MonkeyRunner_MonkeyRunner实例收集
以下是MonkeyRunner的一些实例,大家可以参考:例句1:device.press("DPAD_DOWN", MonkeyDevice.DOWN_AND_UP) or device.press("DPAD_UP", MonkeyDevice.DOWN_AND_UP)例句2:to reach the particular button and then click th原创 2012-08-07 14:33:06 · 1923 阅读 · 1 评论 -
MonkeyRunner_no codec search functions registered: can't find encoding
#-*- coding:utf-8 -*-import sysfrom com.android.monkeyrunner import MonkeyRunner,MonkeyDevice,MonkeyImagedevice = MonkeyRunner.waitForConnection()devWidth = int(device.getProperty('display.wid原创 2012-08-07 15:34:26 · 2749 阅读 · 1 评论 -
MonkeyRunner_monkeyrunner 读写excel文件
#import sys#print sys.pathimport syspathList=['/usr/lib/python2.7', '/usr/local/lib/python2.7/dist-packages', '/usr/lib/python2.7/dist-packages']for list in pathList: sys.path.append(list原创 2012-10-30 13:16:45 · 1452 阅读 · 0 评论 -
MonkeyRunner_Android自动化测试之使用java调用monkeyrunner
众所周知,一般情况下我们使用android中的monkeyrunner进行自动化测试时,使用的是python语言来写测试脚本。不过,最近发现可以用java调用monkeyrunner Api,用java语言写测试脚本。 于是,就简单研究了一下。这里做一些总结。希望有对在研究的午饭可以有所用处。开始时,搜素到一些零碎的教程,说使用java调用monkeyrunner时,需要导转载 2012-11-27 16:18:26 · 1187 阅读 · 1 评论 -
MonkeyRunner_My test app source code
# -*- coding:utf-8 -*-'''Created on Nov 27, 2012@author: aaa'''import sysfrom com.android.monkeyrunner import MonkeyRunner as mr,MonkeyDevice as mddef startApp(d): "my package n原创 2012-11-27 14:28:29 · 995 阅读 · 0 评论 -
MR_ Android view client source code(3)---获取当前view id的名称
#!/usr/bin/env monkeyrunner# -*- coding:utf-8 -*-'''Copyright (C) 2012 Diego Torres MilanoCreated on Feb 3, 2012@author: diego'''import sysimport os# this must be imported befor原创 2013-08-22 16:47:51 · 3067 阅读 · 11 评论 -
MR_Android View Client 问题总结及代码片段
06:32:22 E/hierarchyviewer: Unable to get view server version from device emulator-555406:32:22 E/hierarchyviewer: Unable to get view server protocol version from device emulator-5554出现此问题是因为模拟器的调原创 2012-12-19 18:28:32 · 2695 阅读 · 3 评论 -
MR_Android view client source code(2)
#!/usr/bin/env monkeyrunner'''Copyright (C) 2012 Diego Torres MilanoCreated on Feb 3, 2012@author: diego'''import sysimport os# this must be imported before MonkeyRunner and Monke原创 2013-08-21 14:51:22 · 1540 阅读 · 1 评论 -
MR_Android view client source code(1)
#-*-coding:utf-8 -*-#! /usr/bin/env monkeyrunner'''Copyright (C) 2012 Diego Torres MilanoCreated on May 5, 2012 @author: diego'''import sysimport os# this must be imported be原创 2012-12-13 14:46:54 · 1553 阅读 · 2 评论 -
MR_AndroidViewClient: Getting Browser's HTML page source
Standard Android Browser does not provide an option in its menu to view the HTML page source. Some workarounds like installing apps and then usingShare page from Browser's menu has been described an转载 2012-12-14 15:38:09 · 1177 阅读 · 4 评论 -
MR_monkey runner下图片比对
from com.android.monkeyrunner import MonkeyRunner, MonkeyDeviceimport osimport timeimport mathimport re def getx(n): if n in ('1', '4', '7'): return 50 elif n in ('2', '5', '8', '0'原创 2012-12-20 14:15:28 · 1678 阅读 · 3 评论 -
MR_API帮助实例
现在学习使用monkeyrunner,顺便总结一下monkey runner api调用的一些实例:1. getSubImagefrom com.android.monkeyrunner import MonkeyRunner, MonkeyDevicefilename = '1.png'device = MonkeyRunner.waitForConnection()de转载 2012-12-20 14:01:26 · 1191 阅读 · 0 评论 -
MR_运行monkey runner出现的问题记录
1. C:\Users\xxx>monkeyrunner sina_demo.pyCan't open specified script fileUsage: monkeyrunner [options] SCRIPT_FILE -s MonkeyServer IP Address. -p MonkeyServer TCP Port.原创 2013-07-27 09:09:09 · 1907 阅读 · 2 评论 -
MonkeyRunner_Android view client的配置
在monkey runner中使用android view client 1.下载 Android view clienthttps://github.com/dtmilano/AndroidViewClient2.解压到本地,然后配置ANDROID_VIEW_CLIENT_HOME在ubuntu 下打开terminal,然后输入vim ~/.bashrc,添加如下设置原创 2012-12-13 11:25:23 · 2616 阅读 · 3 评论 -
MonkeyRunner_monkeyrunner: interacting with the Views
The time may come when you want your tests to interact with theApplication Under Test (AUT) in a more clever way than just guessing the View's coordinates on the screen and sending the events.转载 2012-12-13 14:52:32 · 721 阅读 · 0 评论 -
MonkeyRunner_TypeError: __init__() takes at least 3 arguments (2 given)
121213 13:37:13.553:S [MainThread] [com.android.monkeyrunner.MonkeyRunnerOptions] Script terminated due to an exception121213 13:37:13.553:S [MainThread] [com.android.monkeyrunner.MonkeyRunnerOption原创 2012-12-13 13:34:26 · 4975 阅读 · 4 评论 -
MonkeyRunner_monkeyrunner的iQuery插件使用说明
刚刚上传了monkeyrunner的iQuery插件,完整下载和示例代码请在此下载:https://github.com/downloads/vowei/iQuery/iquery%20monkeyrunner%20plugin%20sample.zip示例代码是随便找的针对大众点评写的,因此请确保手机上已经安装了大众点评的应用。示例代码下载后,请设置一个变量:“ANDROID_H转载 2012-12-02 13:00:12 · 915 阅读 · 0 评论 -
MonkeyRunner_使用java调用monkeyrunner(补充篇)
上一篇使用java调用monkeyrunner(http://www.cnblogs.com/nuliniaoboke/archive/2012/11/23/2784385.html)中遗留了一个问题,就是上次用的是低版本的4个包解决的问题,使用高版本的jar包怎么调用monkeyrunner呢?经过一位朋友的提示说,现在高版本的方法已经变了,我就按照他的提示,上网搜了一下需要的类,测试通转载 2012-11-28 21:05:34 · 1538 阅读 · 0 评论 -
MonkeyRunner_MonkeyRunnerExamples
#! /usr/bin/env monkeyrunner ''' Created on Apr 1, 2011 @author: sj ''' import sys # import the MonkeyRunners modules used by this program from com.android.mon转载 2012-08-07 16:41:29 · 1433 阅读 · 2 评论 -
MonkeyRunner_MonkeyPlayback脚本命令
执行的脚本如下:WAIT|{'seconds':15.0,}TOUCH|{'x':294,'y':100,'type':'downAndUp',}WAIT|{'seconds':5.0,}TOUCH|{'x':242,'y':666,'type':'downAndUp',}WAIT|{'seconds':6.0,}TOUCH|{'x':84,'y':242,'type':'原创 2012-08-08 10:57:22 · 1149 阅读 · 0 评论 -
monkeyrunner测试apk包安装卸载
from com.android.monkeyrunner import MonkeyRunner, MonkeyDevicedevice = MonkeyRunner.waitForConnection()#install package NotesList.apk#可以通过创建samples project 然后运行安装NotesList.apk到手机设备上#device.in转载 2012-01-06 11:36:24 · 3211 阅读 · 2 评论 -
MonkeyRunner_MonkeyRunner 步骤与可调用的方法
1. #导入模块; from com.android.monkeyrunner import MonkeyRunner, MonkeyDevice, MonkeyImage2. #连接当前设备,并返回一个MonkeyDevice对象; device = MonkeyRunner.waitForConnection() if not device:转载 2012-02-26 18:31:19 · 1819 阅读 · 4 评论 -
MonkeyRunner_MonkeyRunner,MonkeyDevice,MonkeyImage可以调用的方法
由于经常找MonkeyRunner,MonkeyDevice,MonkeyImage可以调用的方法,感觉搜索起来比较麻烦,所以在这总结一下:from com.android.monkeyrunner import MonkeyRunner, MonkeyDevice, MonkeyImagefor m in [MonkeyRunner, MonkeyDevice, MonkeyImage]原创 2012-02-26 18:09:17 · 1704 阅读 · 0 评论 -
MonkeyRunner_启动应用程序
前段时间一直纠结于怎样才能获取应用程序的安装包名称与startActivity名称,这个问题的产生是这样的:我一直在学习android device的自动化测试,发现团购大全在团购方面确实不错,于是就想用自动化来实现其中的一部分功能。 配置:首先需要安装SL4A,这个在我以前的文章中有描述,那怎样才能用monkeyrunner启动团购大全呢? 1.首先请参考以下代码:原创 2012-02-26 16:54:32 · 4047 阅读 · 0 评论 -
MonkeyRunner_MonekyRunner之连续删除Note
import sysfrom com.android.monkeyrunner import MonkeyRunner,MonkeyDevicedevice=MonkeyRunner.waitForConnection()#Create the first notefor l in range(5):if ldevice.startActivity(component="c原创 2012-02-24 13:22:51 · 1271 阅读 · 0 评论 -
MonkeyRunner_device.press()可以调用的参数
http://developer.android.com/reference/android/view/KeyEvent.html转载 2012-02-24 13:36:53 · 2046 阅读 · 0 评论 -
Using Android monkeyrunner from Eclipse in Windows
在Eclipse中配置完jython,运行 MonkeyRunner出现如下错误: Traceback (most recent call last): File "D:\AndroidExercise\connectDevice\connectPhone\cpm\example\connect\connectTest.py", line 7, in from com.a原创 2012-01-08 17:09:28 · 1681 阅读 · 0 评论 -
Android Developers_MonkeyRunner
I need using monkeyrunner do some easy auto test but have some problem. Eclipse SDK 3.6.2 (Pydev 1.6.5 + Jython 2.5.2 + Python 2.7.1 + monkeyrunner.jar + google-collect-1.0-rc1.jar) jdk1.6.0_2转载 2012-01-08 13:31:51 · 1137 阅读 · 0 评论