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)
最新文章
- undefined
- Hadoop中MR程序的几种提交运行模式
- 动画的使用—Drawable Animation
- AngularJs ng-route路由详解
- Apache Tomcat
- android: Incorrect line ending: found carriage return (\r) without corresponding newline (\n)
- Android Activity形象描述
- Codeforce 222 div1
- SQLite for C#
- TFTP:简单文本传输协议,BOOTP:引导程序协议
- HDU 1887 Weird Numbers(负数的进制转化)
- 程序员需要有多懒 ?- cocos2d-x 数学函数、常用宏粗整理 - by Glede
- 【平板电脑模拟器】PC端-Chrome自带的功能
- 001_Go hello world
- AFNetworking 3.0中调用[AFHTTPSessionManager manager]方法导致内存泄漏的解决办法
- 挂载银行前置机Ukey到windows server2012虚拟机的操作记录
- Spring 扫描标签<;context:component-scan/>;
- 20155233 《网络对抗》Exp4 恶意代码分析
- lua 创建listview
- springboot引入springSecurity无法post提交表单