• Appium 环境搭建


    本文没有安装 Appium Desktop,Appium Server 直接在命令行中进行即可。

    1. Homebrew,macOS 包管理器: ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)" 。
    2. Carthage,appium-doctor 会检查这一项: brew install carthage 。
    3. node & npm,nodejs: brew install node 。
    4. appium:npm install -g appium,推荐使用淘宝镜像 npm --registry http://registry.npm.taobao.org install -g appium 。
    5. wd: npm --registry http://registry.npm.taobao.org install -g wd 。
    6. appium-doctor: npm --registry http://registry.npm.taobao.org install -g appium-doctor 。
    7. Xcode:App Store上安装时一直转圈,网上找到两种解决方案:一更改 DNS 为114.114.114.114,无效;二是去苹果开发中心下载 Xcode 安装包,一直在官网没找到/(ㄒoㄒ)/~~。发现自己 App Store中 macOS Sierra 需要更新,更新完成后重启电脑,再在 App Store 中下载 Xcode,可以了。
    8. Android SDK:Android Studio 中文社区有提供独立安装包
    9. 环境变量配置:
      1. 新建 ~/.bash_profile 文件: touch ~/.bash_profile 。
      2. 在 .bash_profile 文件写入一下内容,配置环境变量。
        export ANDROID_HOME="/usr/local/bin/android-sdk"
        export JAVA_HOME=$(/usr/libexec/java_home)
        export PATH=$PATH:$JAVA_HOME/bin:$ANDROID_HOME/tools:$ANDROID_HOME/platform-tools 
      3. 执行 .bash_profile,使环境变量生效:source ~/.bash_profile 。
    10. 检查配置环境
      ➜  ~ appium-doctor
      info AppiumDoctor Appium Doctor v.1.4.3
      info AppiumDoctor ### Diagnostic starting ###
      info AppiumDoctor  ✔ The Node.js binary was found at: /usr/local/bin/node
      info AppiumDoctor  ✔ Node version is 8.2.1
      info AppiumDoctor  ✔ Xcode is installed at: /Library/Developer/CommandLineTools
      info AppiumDoctor  ✔ Xcode Command Line Tools are installed.
      info AppiumDoctor  ✔ DevToolsSecurity is enabled.
      info AppiumDoctor  ✔ The Authorization DB is set up properly.
      info AppiumDoctor  ✔ Carthage was found at: /usr/local/bin/carthage
      info AppiumDoctor  ✔ HOME is set to: /Users/yufei
      info AppiumDoctor  ✔ ANDROID_HOME is set to: /usr/local/bin/android-sdk
      info AppiumDoctor  ✔ JAVA_HOME is set to: /Library/Java/JavaVirtualMachines/jdk1.8.0_141.jdk/Contents/Home
      info AppiumDoctor  ✔ adb exists at: /usr/local/bin/android-sdk/platform-tools/adb
      info AppiumDoctor  ✔ android exists at: /usr/local/bin/android-sdk/tools/android
      info AppiumDoctor  ✔ emulator exists at: /usr/local/bin/android-sdk/tools/emulator
      info AppiumDoctor  ✔ Bin directory of $JAVA_HOME is set
      info AppiumDoctor ### Diagnostic completed, no fix needed. ###
      info AppiumDoctor 
      info AppiumDoctor Everything looks good, bye!
      info AppiumDoctor
  • 相关阅读:
    C++类型转换(字符串)
    GDI+ 中Image::FromStream ,用流的方式显示图像
    mfc对话框序列化实例
    配置android开发环境eclipse获取ADT获取不到(转)
    vs开发错误总结
    MFC获取文件操作
    Android系统架构剖析(转)
    OpenCV 图像采样 插值 几何变换
    C++ char*,char[],string,CString转换
    Simscape Multibody 教程 —— 入门学习
  • 原文地址:https://www.cnblogs.com/bilibang/p/7261852.html
Copyright © 2020-2023  润新知