appium mac環境配置安裝(ios自動化)
阿新 • • 發佈:2019-01-05
- JAVA安裝配置
- 下載安裝後設置環境變數,~/.bash_profile
- Android SDK安裝配置
- 直接下載壓縮包解壓安裝後設置環境變數,~/.bash_profile
- 或者brew cask install android-sdk,同樣設定環境變數
- Node安裝配置
- Nodejs安裝完成之後避免npm安裝包需要root許可權,對nodejs目錄設定許可權:sudo chown -R
whoami
/usr/local (https://github.com/npm/npm/issues/5922) - 安裝nrm, npm install -g nrm
- 通過nrm設定npm源為cnpm或者taobao
- Nodejs安裝完成之後避免npm安裝包需要root許可權,對nodejs目錄設定許可權:sudo chown -R
- appium安裝配置,GFW存在下載比較慢
- npm install -g appium
appium-doctor安裝(
npm install -g appium-doctor
),檢測出如下問題- 提示Xcode Command Line Tools are NOT installed!
- Command Line Tools:是在Xcode中的命令列工具
- 安裝:xcode-select –install
- 提示Carthage was NOT found
- Carhtage介紹:Carthage用於管理Cocoa第三方框架的工具
- 安裝:brew install carthage //WebDriverAgent 依賴的管理工具
- WebDriverAgent is a WebDriver server implementation for iOS that can be used to remote control iOS devices. It allows you to launch & kill applications, tap & scroll views or confirm view presence on a screen. (
- WebDriverAgent is a WebDriver server implementation for iOS that can be used to remote control iOS devices. It allows you to launch & kill applications, tap & scroll views or confirm view presence on a screen. (
- 完全安裝好後,檢查結果如下
- 提示Xcode Command Line Tools are NOT installed!
ios8+需要使用XCUITest框架;
擴充套件包安裝:
- brew install libimobiledevice —-HEAD //git submodules的依賴,真機必裝
- brew install ideviceinstaller // IOS9有效,IOS無效
- npm install -g ios-deploy //IOS10,真機必裝
- gem install xcpretty //可以不安裝,make Xcode output more reasonable
- 真機使用XCUItest執行的配置步驟
- Necessary installed software,必裝軟體
- libimobiledevice,見上步驟
- ios-deploy,見上步驟
- code sign config,證書籤名配置並打包WebDriverAgentRunner安裝在裝置中
- WebDriverAgent依賴下載安裝步驟:
- cd ~/node_modules/appium/node_modules/appium-xcuitest-driver/WebDriverAgent
- mkdir -p Resources/WebDriverAgent.bundle
- sh ./Scripts/bootstrap.sh
- 遇到一個問題fatal: could not read Username for ‘https://github.com‘: terminal prompts’,經過排查,發現其中一個包改變了github源地址,無法下載所以報錯,更新[email protected]+即可(直接升級到了1.6.5)
- 遇到一個問題Error: Cannot find module ‘eslint-config-appium’,加上引數-d即可,sh ./Scripts/bootstrap.sh -d
- WebDriverAgent依賴下載安裝步驟:
- Necessary installed software,必裝軟體