• 手机端测试--准备


    Appium环境搭建

    1.安装Oracle VirtualBox >= 4.1(版本越高越好)

    下载地址:https://www.virtualbox.org/wiki/Downloads官方下载安装,

    以及打上相应的补丁,如VirtualBox 4.2.16 Oracle VM VirtualBox Extension Pack

    2.安装Android开发环境:SDK,Eclipse+ADT

    下载地址:http://www.android-doc.com/sdk/index.html

    3.安装genymotion

    下载地址:https://www.genymotion.com

    按图形界面提示,一直点击下一步就可以完成安装了

    需要注意几点:

    a.genymotion和VirtualBox版本要一致

    b.genymotion中adb设置,不能使用默认sdk,否则会报错

    c.虚拟器都安装成功后,需要在虚拟器中安装Genymotion-ARM-Translation插件,所有关于  arm报错都是因为插件没有安装

    下载地址:资源很多,自己搜吧

    adb基本命令

    adb shell dumpsys activity | grep Focuse >/Libary/log.txt                      查询当前打开的活动名称并输出到/Libary/log.txt目录

    adb shell dumpsys activity | findstr Focuse                                           查询当前打开的活动名称(windows cmd下执行)

    adb shell pm list package                                                                    列出所有已安装的包名

    adb shell am start -W -n p(包名)/p(包名)+a(活动名)                      强行用adb启动一个活动

    adb shell am force-stop                                                                      强制退出

    adb shell pm clear                                                                              清除缓存

    install                                   安装卸载

    unstall                                  卸载

    push

    pull

    adb shell getprop ro.serialno                                                                查询设备串号

    eclipse封装adb命令

    1.执行adb命令的类及方法调用

    Runtime.getRuntime().exec("adb devices");
  • 相关阅读:
    Golang Gin 框架 Route备注
    golang的时区和神奇的time.Parse
    Linux下查看内存使用情况方法总结
    Golang 图片上绘制文字
    在linux中安装字体
    一键解决 go get golang.org/x 包失败
    go如何进行交叉编译
    Ubuntu中apt与apt-get命令的区别
    linux dns 工具包 -- bind-utils
    nohup 和 &的含义
  • 原文地址:https://www.cnblogs.com/xiaowei89426/p/6506034.html
Copyright © 2020-2023  润新知