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系列的博客已经一年多了.这一年多时间经历了 ...
随机推荐
- C 标准库 - <stddef.h>
C 标准库 - <stddef.h> 简介 stddef .h 头文件定义了各种变量类型和宏.这些定义中的大部分也出现在其它头文件中. 库变量 下面是头文件 stddef.h 中定义的变量 ...
- 百度 BAE 项目部署
转载:http://www.cnblogs.com/shamoyuu/p/node_bae.html 百度有一个应用引擎,价格非常便宜,Java的tomcat每天4毛钱,node每天2毛钱,我以前在上 ...
- vs附加到多个进程调试
我们用vs调试,通常附加到一个进程进行调试,有时候需要同时附加到多个进程. 例如:同时调试客户端与服务端,我们需要同时附加到客户端与服务端进程. 按F5(执行)键调试,程序只要遇到断点就中断. 按F1 ...
- MySQL windows集群(转)
http://blog.csdn.net/zhangking/article/details/5670070 MySQL 群集是 MySQL 适合于分布式计算环境的高可用.高冗余版本.它采用了 ...
- muduo::Connector、TcpClient分析
Connector TcpClient Connector Connector用来发起连接. 在非堵塞网络中,主动发起连接比被动接收连接更为复杂,由于要考虑错误处理,还要考虑重试. 主要难点在于 1. ...
- 将UIBezierPath存为自己定义格式的字符串,再将字符串转为UIBezierPath
<pre name="code" class="objc">自己定义字符串格式为:@"123.02,234.23|321.23,432.0 ...
- C# 之 集合ArrayList
.NET Framework提供了用于数据存储和检索的专用类,这些类统称集合. 这些类提供对堆栈.队列.列表和哈希表的支持.大多数集合类实现系统的接口.以下我们主要来讲一下ArrayList. ...
- it starts (“forks”) a new process for each connection.
PostgreSQL: Documentation: 10: 1.2. Architectural Fundamentals https://www.postgresql.org/docs/10/st ...
- 2014 ACM-ICPC Beijing Invitational Programming Contest
点击打开链接 Happy Reversal Time Limit: 1000ms Memory Limit: 65536KB 64-bit integer IO format: %lld J ...
- IOS 文件夹结构
版权声明:本文为博主原创文章,未经博主同意不得转载. https://blog.csdn.net/MyGameZone/article/details/24494765 IOS文件夹结构 说明 这些仅 ...