Mac搭建appium环境

技术架构:appium+android+python

https://www.jianshu.com/p/f7cf077d9444

https://www.jianshu.com/p/63792fd06729

 

  • 注意事项:环境变量配置文件:10.15前使用~/.bash_profile,之后升级的系统使用~/.zshrc

 

  • 安装配置

  1.安装brew,查看版本;brew -v

    sudo gem install redis

    /usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"

  2.安装python3

    brew search python3

    brew install python3

    brew link --overwrite python

 

  • mac报错问题
  1. MacOS安装homebrew报错:

    解决:https://www.cnblogs.com/zhanzhuang/p/12723848.html

 

  1. 安装Appium Desktop。结果报错:不能打开软件提示无法打开“appium”,因为Apple无法检查其是否包含恶意软件

    解决方法:sudo xattr -rd com.apple.quarantine /Applications/Appium.app (应用名称)

 

  1. 使用uiautomatorviewer遇到Remote object doesn't exist

    解决:重启手机、app

 

  • 常用命令
  1. 查看jdk安装路径:/usr/libexec/java_home -V
  2. 启动Appium appium -a 127.0.0.1 -p 4723 

     监听多个端口 appium -p4700 -bp4701

     指定设备:appium -p4723 -U R58M81G95SW

    3.  查看设备号 adb devices

    4.  查看apk的包名和activity:aapt dump badging /Users/o/abc.apk

posted on 2020-08-25 19:36  华曦  阅读(78)  评论(0编辑  收藏  举报