Appium Source Installation Environment configuration iOS

Source: Internet
Author: User
Tags install brew install node appium

I. Introduction of installation Environment
    • MacOS 10.12.4

    • Xcode 8.3.2

    • Applicable model: IOS9 and above model

Second, appium source installation

Xcode does not support uiautomation after upgrading 8.2, and instead uses xcuitest, so when the Xcode version is 8.2 and above, only the Appium 1.5.3 later version can be installed. Appium 1.5.3 is based on the uiautomation low-level driver, even if the installation is successful.

In the actual installation process has been Appium 1.6. Version 3 installation has been unsuccessful, so the following is an example of the 1.6.4-beta version. However, you can also try to install version 1.6.3, it is recommended to choose the official version of the installation.

At the same time 1.5.3 after the version does not have a graphical interface version, so use the source installation.

1. Install Brew

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

2, Installation Libimobiledevice

Brew Install Libimobiledevice--head

3, Installation Carthage

Brew Install Carthage

4. Install node. js

Go to https://nodejs.org/en/download/download. Pkg and install

5, Installation CNPM

NPM install-g cnpm--registry=https://registry.npm.taobao.org

6, Installation Ios-deploy

CNPM install-g Ios-deploy

7, Installation Xcpretty

Gem Install Xcpretty

8, uninstall the original Appium

$ NPM Uninstall Appium-g
$ NPM Cache Clean

9, installation Appium

$ NPM i-g [email protected]

10. Check the installation situation

$ appium-v(the installation succeeds if the version number appears)

11, Installation Appium-doctor

$ NPM i-g Appium-doctor

12. Check the Appium environment

$ appium-doctor

When all is √, appium after the installation of the environment all normal, if there is a problem, please refer to the following questions summary

13. Install Routinghttpserver Library

Background: After installing Appium, there will be a webdriveragent iOS app project, but the Routinghttpserver library cannot be compiled Yi when it is not installed

$ cd/usr/local/lib/node_modules/appium/node_modules/appium-xcuitest-driver/webdriveragent
$ mkdir-p Resources/webdriveragent.bundle
$ sh./scripts/bootstrap.sh-d

14. Webdriveragent project Configuration (a) Xcode open Webdriveragent.xcodeproj Project

Catalog:/usr/local/lib/node_modules/appium/node_modules/appium-xcuitest-driver/webdriveragent)

(b) Change iOS Deployment Target to iOS 9.0

Support for more than 9.3 versions only if not modified

You need to modify the corresponding parameters in project, all targets

(c) Modify Bundlid (must be modified, cannot use default value)

Modify the Product Bundle Identifier parameter in 5 targets

        1. Personal account (non-paying account): can be modified according to your own needs

        2. Corporate account (paid account): If you use your company's account, you need to change it to a specific value (please contact me)

(d) Yi Project

Yi Webdriveragentlib, Webdriveragentrunner, Webdriveragentrunner-nodebug, Integrationapp; all the Yi through, that is, the completion of the project configuration;

(e) Launch of the Appium service

$ appium-a 127.0.0.1-p 4723

(f) Verifying that the Appium service is available

$ xcodebuild-project/usr/local/lib/node_modules/appium/node_modules/appium-xcuitest-driver/webdriveragent/ Webdriveragent.xcodeproj-scheme webdriveragentrunner-destination id= Device Udid test

The following appears, the service is available:

Test case '-[uitestinguitests Testrunner] ' started.
t = 0.00s Start Test at 2017-05-09 21:49:32.939
t = 0.01s Set up
2017-05-09 21:49:32.968 xctrunner[663:156885] Built at 9 2017 21:49:21
2017-05-09 21:49:33.006 xctrunner[663:156885] Serverurlhere->http://10.1.17.177:8100<-serverurlhere

Iii. Summary of issues1. Appium-doctor:xcode Command line Tools not installed

Xcode-select--install

2, APPIUM-DOCTOR:ADB, Android not found (a) It is recommended to install Android ADT (http://tools.android-studio.org/index.php/ adt-bundle-plugin) After download, you can use (b) Configure environment variables

1. Open a. bash_profile file

$ cd ~
$ open-e. Bash_profile

2. Add the following:

Where/users/xxx/documents/1--xxx/automation/adt-bundle-mac-x86_64-20131030 is the directory after ADT decompression

Export Path=${path}:/users/xxx/documents/1--xxx/automation/adt-bundle-mac-x86_64-20131030/sdk/platform-tools
Export Path=${path}:/users/xxx/documents/1--xxx/automation/adt-bundle-mac-x86_64-20131030/sdk/tools
Export Android_home= "/USERS/XXX/DOCUMENTS/1--XXX/AUTOMATION/ADT-BUNDLE-MAC-X86_64-20131030/SDK"
Export path=${path}:/users/xxx/documents/1--xxx/automation/adt-bundle-mac-x86_64-20131030/sdk/tools:/users/xxx/ documents/1--xxx/automation/adt-bundle-mac-x86_64-20131030/sdk/platform-tools:/$JAVA _home/bin

3. Save and close the. bash_profile file

4. Update the configured environment variables

source. bash_profile

(c) Appium-doctor:javahome environment

1. Mac generally has built-in Java installed, you can first try to configure environment variables

2. Add the following in the. bash_profile file

Export JAVA_HOME=/USR

3. If you still have a problem, try reinstalling

(d) code:65, Signal:null;code:null, Signal:sigkill

General in "Two, step 16" Inspection times error:

>> xctest-client.js:202:14 [master] pid:17430 xctest client exit with CODE:65, Signal:null
>> xctest-client.js:230:14 [master] pid:17430 Iproxy exit with Code:null, Signal:sigkill
>> xctest-client.js:157:16 [master] pid:17430 Deviceconsole exit with Code:null, Signal:sigkil

The cause of this problem is basically webdriveragent the configuration of the project is not correct, basic certificate issues, according to "two, step 14" Reconfigure the project, to ensure that all the Yi through.

Iv. Deficiencies
    1. In this version of Appium, you cannot use Inspecter to get control information (subsequent methods that provide app-inspecter for control fetching)

    2. Due to Webdriveragent Engineering Yi of the IPA program can only be installed in the iOS9 above, it can not be automated on IOS7?IOS8

Appium Source installation environment to configure iOS

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.