android自动化测试常用命令
时间: 2023-04-04 09:01:42 浏览: 162
您好,以下是 Android 自动化测试常用命令:
1. adb shell am start -n package/activity:启动应用程序
2. adb shell input text "text":输入文本
3. adb shell input keyevent keycode:发送按键事件
4. adb shell dumpsys window windows | grep -E 'mCurrentFocus|mFocusedApp':获取当前应用程序的包名和活动名称
5. adb shell uiautomator dump /sdcard/xxx.xml:将当前屏幕的 UI 层次结构导出到 XML 文件
6. adb shell uiautomator runtest xxx.jar -c package.class:运行 UI 自动化测试用例
希望能对您有所帮助。
阅读全文
相关推荐
![doc](https://img-home.csdnimg.cn/images/20241231044833.png)
![-](https://img-home.csdnimg.cn/images/20241231044833.png)
![doc](https://img-home.csdnimg.cn/images/20241231044833.png)
![docx](https://img-home.csdnimg.cn/images/20241231044901.png)
![txt](https://img-home.csdnimg.cn/images/20241231045021.png)
![-](https://img-home.csdnimg.cn/images/20241231044930.png)
![-](https://img-home.csdnimg.cn/images/20241231044930.png)
![-](https://img-home.csdnimg.cn/images/20241231045053.png)
![-](https://img-home.csdnimg.cn/images/20241231044901.png)
![-](https://img-home.csdnimg.cn/images/20241231044955.png)
![-](https://img-home.csdnimg.cn/images/20241231045053.png)
![-](https://img-home.csdnimg.cn/images/20241231044833.png)
![-](https://img-home.csdnimg.cn/images/20241231045053.png)
![-](https://img-home.csdnimg.cn/images/20241231045053.png)
![-](https://img-home.csdnimg.cn/images/20241226111658.png)