android自动化测试之uiautomator
1.通过monkeyrunner.bat monkey_record.py启动MonkeyRecorder进行拿到各个控件的坐标(要连上手机才可以启动)
2.也可以通过uiautomatorviewer.bat拿到res-id/text/desc来控制各个控件
monkey_record.py
#!/usr/bin/env monkeyrunner
# Copyright 2010, The Android Open Source Project#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at#
# http://www.apache.org/licenses/LICENSE-2.0#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
from com.android.monkeyrunner import MonkeyRunner as mr
from com.android.monkeyrunner.recorder import MonkeyRecorder as recorder
device = mr.waitForConnection()
recorder.start(device)
android自动化测试之uiautomator的更多相关文章
- Android自动化测试之Monkeyrunner学习笔记(一)
Android自动化测试之Monkeyrunner学习笔记(一) 因项目需要,开始研究Android自动化测试方法,对其中的一些工具.方法和框架做了一些简单的整理,其中包括Monkey.Monkeyr ...
- [转] Android自动化测试之使用java调用monkeyrunner(五)
Android自动化测试之使用java调用monkeyrunner 众所周知,一般情况下我们使用android中的monkeyrunner进行自动化测试时,使用的是python语言来写测试脚本.不过, ...
- Android自动化测试之环境搭建
Android自动化测试之环境搭建 一.Android-sdk介绍 SDK(Software development kit)软件开发工具包.被软件开发工程师用于为特定的软件包.软件框架.硬件平台. ...
- Android自动化测试之MonkeyRunner录制和回放脚本
Android自动化测试之MonkeyRunner录制和回放脚本(十一) 分类: 自动化测试 Android自动化 2013-02-22 10:57 7346人阅读 评论(2) 收藏 举报 andro ...
- Android自动化测试之Monkey 转自:LupuX
版权声明:本文为博主原创文章,未经博主允许不得转载. https://blog.csdn.net/u011436666/article/details/53998332 在之前的文章Android自动 ...
- android app自动化测试之UIAutomator
一.UIAutomator Android自动化测试工具有很多,但是要免费.易上手,本人觉得就直接使用Eclipse自带的UIAutomator就不错.测试人员无需跟开发要代码信息,只要手机上有安装之 ...
- Android无线测试之—UiAutomator UiSelector API介绍之一
一. UiSelector类介绍: 1) UiSelector类说明: UiSelector代表一种搜索条件,可以在当前界面上查询和获取特定元素的句柄,当找到多余一个的匹配元素,则返回布局层次结构上第 ...
- Android自动化测试之MonkeyRunner
1.Monkeyrunner简介 Monkeyrunner是Android系统自带的四大自动化测试工具之一,其他三个是Monkey.CTS.Benchmark:Monkeyrunner需要通过Andr ...
- Android自动化测试之Monkeyrunner从零开始(三)
转自http://www.51testing.com/html/81/22381-854342.html 时光过得太快了,一晃离上一篇monkeyrunner系列的博客已经一年多了.这一年多时间经历了 ...
随机推荐
- cocos2dx3.0 对象池
watermark/2/text/aHR0cDovL2Jsb2cuY3Nkbi5uZXQvdzE4NzY3MTA0MTgz/font/5a6L5L2T/fontsize/400/fill/I0JBQk ...
- ARP协议(1)什么是ARP协议
这是最近在看<TCP/IP具体解释>系列书总结出来的,之后会陆续把其它协议部分分享出来. 我尽量以简单易读.易懂的方式呈现出来,可是,因为文笔和水平有限.有些地方或许存在描写叙述上的不足或 ...
- oracle insert/update
insert into table (,,) values (,,) where update table set (,)=(select , from ) where
- 基于flask做权限控制
和Django实现的原理类似,有时间补充
- Java Web Start
1. JNLP 2. Security issue: https://java.com/en/download/help/win_controlpanel.xml Windows 7, Vista C ...
- 九度OJ 1093:WERTYU (翻译)
时间限制:1 秒 内存限制:32 兆 特殊判题:否 提交:1563 解决:609 题目描述: A common typing error is to place the hands on the ke ...
- Share Memory By Communicating
Share Memory By Communicating - The Go Programming Language https://golang.google.cn/doc/codewalk/sh ...
- Connection Phase Packets
Connection Phase Packets https://dev.mysql.com/doc/internals/en/connection-phase-packets.html#packet ...
- ABAP 将Range 条目数转化
RANGES:r_vbeln FOR lips-vbeln. r_vbeln-sign = 'I'. r_vbeln-option = 'EQ'. LOOP AT gt_item INTO gw_it ...
- Spring AOP-xml配置
在spring AOP(一)中介绍了AOP的基本概念和几个术语,现在学习一下在XML中如何配置AOP. 在XML中AOP的配置元素有以下几种: AOP配置元素 描述 <aop:config> ...