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)

最新文章

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

热门文章

  1. php性能监控扩展xhprof
  2. Cookie学习笔记二:Cookie实例
  3. leetcode 题解 || Remove Nth Node From End of List 问题
  4. 10934 - Dropping water balloons(DP)
  5. liunx安装pip
  6. php跳转
  7. 一致性Hash简单介绍和使用
  8. WPF触发器(Trigger、DataTrigger、EventTrigger)
  9. 学习某些API的方法
  10. wcf系列(一)--- 寄宿方式