Appium Mac 命令行安装

笛里谁知壮士心,沙头空照征人骨。这篇文章主要讲述Appium Mac 命令行安装相关的知识,希望能为你提供帮助。
试过很多方法都失败,打算用命令行方式安装。
准备工作:
  从  https://github.com/appium/appium下载appium版本的源码(.tar)
  详见github_Appium1.6.5
1. 命令行安装node:

brew install node

  2. cd 到 appium.tar的解压后的路径
  3.   安装appium
npm install -g ./appium

【Appium Mac 命令行安装】  安装后界面:
nalideMacBook-Pro:appium-1.6.5 nali$ npm install -g appium npm WARN deprecated babel[email  protected]5.8.24: Babel 5 is no longer being maintained. Upgrade to Babel 6. npm WARN deprecated [email  protected]2.0.10: Please update to minimatch 3.0.2 or higher to avoid a RegExp DoS issue npm WARN deprecated line[email  protected]0.2.0: Copy its ~20 LOC directly into your code instead. /usr/local/bin/appium -> /usr/local/lib/node_modules/appium/build/lib/main.js> [email  protected]2.11.2 install /usr/local/lib/node_modules/appium/node_modules/appium-chromedriver > node install-npm.jsinfo Chromedriver Install Installing Chromedriver version ‘2.28‘ for platform ‘mac‘ and architecture ‘64‘ info Chromedriver Install Opening temp file to write chromedriver_mac64 to... info Chromedriver Install Downloading https://chromedriver.storage.googleapis.com/2.28/chromedriver_mac64.zip... info Chromedriver Install Writing binary content to /var/folders/gs/1rvd4dj94gn10btdfzmq50680000gn/T/201787-9541-1hmuws9.6gxs/chromedriver_mac64.zip... info Chromedriver Install Extracting /var/folders/gs/1rvd4dj94gn10btdfzmq50680000gn/T/201787-9541-1hmuws9.6gxs/chromedriver_mac64.zip to /var/folders/gs/1rvd4dj94gn10btdfzmq50680000gn/T/201787-9541-1hmuws9.6gxs/chromedriver_mac64 info Chromedriver Install Creating /usr/local/lib/node_modules/appium/node_modules/appium-chromedriver/chromedriver/mac... info Chromedriver Install Copying unzipped binary, reading from /var/folders/gs/1rvd4dj94gn10btdfzmq50680000gn/T/201787-9541-1hmuws9.6gxs/chromedriver_mac64/chromedriver... info Chromedriver Install Writing to /usr/local/lib/node_modules/appium/node_modules/appium-chromedriver/chromedriver/mac/chromedriver... info Chromedriver Install /usr/local/lib/node_modules/appium/node_modules/appium-chromedriver/chromedriver/mac/chromedriver successfully put in place> [email  protected]1.6.2 install /usr/local/lib/node_modules/appium/node_modules/appium-selendroid-driver > node ./bin/install.jsdbug androidDriver Getting java version info AndroidDriver Java version is: 1.8.0_144 info Selendroid Ensuring /usr/local/lib/node_modules/appium/node_modules/appium-selendroid-driver/selendroid/download exists

……

4.   命令行运行appium 检查是否能够启动
nalideMacBook-Pro:appium-1.6.5 nali$ appium [Appium] Welcome to Appium v1.6.5 [Appium] Appium REST http interface listener started on 0.0.0.0:4723

5. 验证的第二种方式,安装appium-doctor.
    详见github_appium_doctor

  Appium 安装过程中也会遇到下面的error问题,但是不影响。后续解决
 
dbug AndroidDriver Getting Java version info AndroidDriver Java version is: 1.8.0_144 info Selendroid Ensuring /usr/local/lib/node_modules/appium/node_modules/appium-selendroid-driver/selendroid/download exists info Selendroid Downloading Selendroid standalone server version 0.17.0 from http://repo1.maven.org/maven2/io/selendroid/selendroid-standalone/0.17.0/selendroid-standalone-0.17.0-with-dependencies.jar --> /usr/local/lib/node_modules/appium/node_modules/appium-selendroid-driver/selendroid/download/selendroid-server-7cf7163ac47f1c46eff95b62f78b58c1dabdec534acc6632da3784739f6e9d82.jar info Selendroid Writing binary content to /usr/local/lib/node_modules/appium/node_modules/appium-selendroid-driver/selendroid/download/selendroid-server.jar.tmp ERR! Selendroid Error: bad SHA256 fingerprint: 33337a518022088f462d05787fbe6c757b8070b6a1022368163c5ddd6e817871 bytes: 5322043 ERR! Selendroidat Object.wrappedLogger.errorAndThrow (../../lib/logging.js:63:13) ERR! Selendroidat downloadSelendroid$ (../../lib/installer.js:84:9) ERR! Selendroidat tryCatch (/usr/local/lib/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:67:40) ERR! Selendroidat GeneratorFunctionPrototype.invoke [as _invoke] (/usr/local/lib/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:315:22) ERR! Selendroidat GeneratorFunctionPrototype.prototype.(anonymous function) [as next] (/usr/local/lib/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:100:21) ERR! Selendroidat GeneratorFunctionPrototype.invoke (/usr/local/lib/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:136:37) ERR! Selendroidat < anonymous> ERR! SelendroidError: bad SHA256 fingerprint: 33337a518022088f462d05787fbe6c757b8070b6a1022368163c5ddd6e817871 bytes: 5322043 ERR! Selendroidat Object.wrappedLogger.errorAndThrow (../../lib/logging.js:63:13) ERR! Selendroidat downloadSelendroid$ (../../lib/installer.js:84:9) ERR! Selendroidat tryCatch (/usr/local/lib/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:67:40) ERR! Selendroidat GeneratorFunctionPrototype.invoke [as _invoke] (/usr/local/lib/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:315:22) ERR! Selendroidat GeneratorFunctionPrototype.prototype.(anonymous function) [as next] (/usr/local/lib/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:100:21) ERR! Selendroidat GeneratorFunctionPrototype.invoke (/usr/local/lib/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:136:37) ERR! Selendroidat < anonymous> Selendroid setup files did not yet exist, waiting...

 




    推荐阅读