zoukankan      html  css  js  c++  java
  • [www.infoshare.cc]Appium环境配置-Mac

    来源:http://www.infoshare.cc

     

    1、下载appium之前命令行检查

    $ java -version
    java version "1.8.0_71"
    Java(TM) SE Runtime Environment (build 1.8.0_71-b15)
    Java HotSpot(TM) 64-Bit Server VM (build 25.71-b15, mixed mode)
    $ brew -v Homebrew 0.9.9 (git revision 1158; last commit 2016-07-20) Homebrew/homebrew-core (git revision 666b; last commit 2016-07-20) $ node -v v6.3.0

    如果brew和node未安装: 

    a.安装brew命令

    $ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
    b.安装node命令
    $brew install node
    

    2、安装Appium

    a.给予local文件可读可写可执行权限

    $sudo chmod -R 777 /usr/local
    

    b.非root权限下安装Appium

    $npm install -g appium

    c.安装Appium Client

    $git clone https://github.com/appium/python-client.git
    $cd python-client/
    $sudo python setup.py install
    

    d.安装appium-doctor(已经安装的用户可忽略)

    $ appium-doctor
    -bash: appium-doctor: command not found
    superFangfang:python-client macbook$ npm install appium-doctor -g 
    

    e.安装appium.dmg客户端

    下载链接地址:https://bitbucket.org/appium/appium.app/downloads/

    3.检查Appium成功安装

    $ appium-doctor
    info AppiumDoctor ### Diagnostic starting ###
    info AppiumDoctor  ✔ Xcode is installed at: /Applications/Xcode.app/Contents/Developer
    WARN AppiumDoctor  ✖ Xcode Command Line Tools are NOT installed!
    info AppiumDoctor  ✔ DevToolsSecurity is enabled.
    info AppiumDoctor  ✔ The Authorization DB is set up properly.
    info AppiumDoctor  ✔ The Node.js binary was found at: /usr/local/bin/node
    info AppiumDoctor  ✔ HOME is set to: /Users/macbook
    WARN AppiumDoctor  ✖ ANDROID_HOME is NOT set!
    WARN AppiumDoctor  ✖ JAVA_HOME is set to '/System/Library/Frameworks/JavaVM.framework/Versions/1.6.0/Home' but this is NOT a valid path!
    WARN AppiumDoctor  ✖ adb could not be found because ANDROID_HOME is NOT set!
    WARN AppiumDoctor  ✖ android could not be found because ANDROID_HOME is NOT set!
    WARN AppiumDoctor  ✖ emulator could not be found because ANDROID_HOME is NOT set!
    info AppiumDoctor ### Diagnostic completed, 6 fixes needed. ###
    info AppiumDoctor 
    info AppiumDoctor ### Manual Fixes Needed ###
    info AppiumDoctor The configuration cannot be automatically fixed, please do the following first:
    WARN AppiumDoctor - Manually configure ANDROID_HOME.
    WARN AppiumDoctor - Manually configure JAVA_HOME.
    WARN AppiumDoctor - Manually configure ANDROID_HOME and run appium-doctor again.
    info AppiumDoctor ###
    info AppiumDoctor 
    info AppiumDoctor Bye, run appium-doctor again when all manual fixes have been applied!
    info AppiumDoctor 
    

    以上有部分软件未安装,接下来弥补上。

    a.Xcode Command Line Tools

    $ xcode-select --install
    xcode-select: note: install requested for command line developer tools

    b.Android SDK

    下载地址:https://developer.android.com/studio/install.html

    下载完成之后,安装网上步骤一步一步安装并下载完SDK成之后,配置环境变量

    # vim /etc/profile
    
    export ANDROID_HOME=/Users/macbook/Library/Android/sdk
    export PATH=${PATH}:${ANDROID_HOME}/tools
    export PATH=${PATH}:${ANDROID_HOME}/platform-tools
    

    c.网上下载java安装后,配置环境变量

    # vim /etc/profile
    
    export JAVA_HOME=/Library/Java/JavaVirtualMachines/jdk1.8.0_71.jdk/Contents/Home
    export PATH=$JAVA_HOME/bin:$PATH
    export CLASSPATH=.:$JAVA_HOME/lib/dt.jar:$JAVA_HOME/lib/tools.jar
    
    再次检查Appium成功安装
    $ appium-doctor
    info AppiumDoctor ### Diagnostic starting ###
    info AppiumDoctor  ✔ Xcode is installed at: /Applications/Xcode.app/Contents/Developer
    info AppiumDoctor  ✔ Xcode Command Line Tools are installed.
    info AppiumDoctor  ✔ DevToolsSecurity is enabled.
    info AppiumDoctor  ✔ The Authorization DB is set up properly.
    info AppiumDoctor  ✔ The Node.js binary was found at: /usr/local/bin/node
    info AppiumDoctor  ✔ HOME is set to: /Users/macbook
    info AppiumDoctor  ✔ ANDROID_HOME is set to: /Users/macbook/Library/Android/sdk
    info AppiumDoctor  ✔ JAVA_HOME is set to: /Library/Java/JavaVirtualMachines/jdk1.8.0_71.jdk/Contents/Home
    info AppiumDoctor  ✔ adb exists at: /Users/macbook/Library/Android/sdk/platform-tools/adb
    info AppiumDoctor  ✔ android exists at: /Users/macbook/Library/Android/sdk/tools/android
    info AppiumDoctor  ✔ emulator exists at: /Users/macbook/Library/Android/sdk/tools/emulator
    info AppiumDoctor ### Diagnostic completed, no fix needed. ###
    info AppiumDoctor 
    info AppiumDoctor Everything looks good, bye!
    info AppiumDoctor 
    

      

     

  • 相关阅读:
    Oracle诊断:在程序的运行中,有时候数据库会断开连接
    Linux shell
    Java继承和多态-Static关键字
    Oracle诊断:使用USER_SEGMENTS分配给表的物理空间大小
    Linux shell -查找字符(find,xargs,grep)
    Linux shell
    Linux shell
    Linux shell
    Java heap size
    Oracle诊断: 服务器启后,无法连接
  • 原文地址:https://www.cnblogs.com/wonderful0714/p/5692549.html
Copyright © 2011-2022 走看看