Build an iOS automation environment on your Mac

Source: Internet
Author: User
Tags appium

Steps to build the RF environment on your Mac (and some pits):

  1. The Mac comes with a Python environment, and python--version checks the python environment.
    Attention:
    1. Do not use the Mac comes with the Python environment, because the band is 64-bit, Wxpython needs only 32 bits, so Python uses 32 bits (download Python 2.7 installation yourself).
    2. Do not uninstall the Python environment that comes with your Mac, and some apps in your Mac will use Python
    3. After installing the 32-bit Python environment, the command line verifies that the Python version has changed (the "python" command of the terminal executes the "Python" link under/usr/local/bin, and the link is equivalent to the shortcut under win. Do not change this link)
    4. Correct installation is not required, the installation of Python will be automatically added to the path, echo $PATH see if it is added to the path.
  2. Install Wxpython (on a 32-bit Mac only)
    Attention:
    1. When installing the Wxpython, do not double-click the. pkg file, this is not installed (pro-Test) will appear as an error:

    2. Download the 2.8.12.1 DMG file, open the downloaded DMG right click on the. pkg file Select "Show Package Contents", copy the Postflight under Contents/resources/to the desktop or where you think it is easy to find, Unzip. pax.gz, and then copy the local/lib in USR to the usr/local directory (CP command copy) Reference:

    3. Postflight copied to the desktop before running
  3. Install robot framework, PIP install robotframework
  4. Install Ride,pip install robotframework-ride (at the command line input ride.py Verify that the installation is successful, if the Python64 bit is installed there is a method here that can be cast to 32-bit "defaults write Com.apple.versioner.python prefer-32-bit-bool yes ")
  5. You can create an alias for ride, open the. Bash_profile under the user, add a line "Alias Ride= ' ride.py '", and then resource. Bash_profile, which can be started by entering ride directly on the command line.
  6. Install Selenium2library, pip install Robotframework-selenium2library
  7. Install Databaselibrary, double-click Run Mysql-python-1.2.3.win32-py2.7.exe, default next, pip install Robotframework-databaselibrary
  8. Install Httplibrary.http, pip install Robotframework-httplibrary.

Appium (Simulator):

    1. Download appium-1.3.4.dmg(On-machine: High version of Appium is bug not open app), after download, install Appium server

    2. Installing Appium Client,pip Install Appium-python-client

    3. Install Robotframework-appiumlibrary, pip install Robotframework-appiumlibrary

    4. Download Xcode 7.3.1(no Authentication required, you can run application on your phone)

    5. Open Xcode, then create an iOS application (Singleview application), do demo, set product Name, set organization Identifier, Here we can get bundle Identifier (Bundleid), select the project build app that you created (Product->build for->testing,xcode-> Prefernces->locations->deriveddata: Get the app's path)

    6. Open Appium Server, click on iOS Settings, tick the app path to fill out the app's paths here, tick the Bundleid, fill in the Bundleid you've got, tick forcedevice

    7. Click General Settings to set up server Address

    8. Click Lanch to start Appium Server

Appium (physical machine):

    1. Download appium-1.3.4.dmg
    2. Installing Appium Client,pip Install Appium-python-client
    3. Install Robotframework-appiumlibrary, pip install Robotframework-appiumlibrary

    4. Download Xcode 7.3.1
    5. IOS settings do not tick any options with the default configuration, general settings set the server Address,port, click Lanuch Start Server. Inspector is not available at this time because no session is established.
    6. Write a script to the Appium server to pass parameters (the RF calls Appiumlibrary's open application method, and pass in the required parameters: {remote_url=${...},platformname=${...}, Platformversion=${...},devicename=${...},udid=${...},bundleid=${...}} )

Tips:

1. "Doctor" is available after starting Appium server to check that the configuration is correct.

2. To install the matching Xcode command line tools:

    1. $ xcode-select-p Check whether the command line tools is installed correctly, if you have installed you can see/applications/xcode.app/contents/developer
    2. Install command tools, enter $ Xcode-select--install, after installation in Xcode-select-p view, you will see/library/developer/commandlinetools

3. (optional) Mac downloads a tool for Management software brew (equivalent to a PIP for Linux yum,python), install command/USR/BIN/RUBY-E "$ (Curl-fssl https:// Raw.githubusercontent.com/homebrew/install/master/install) ", you can then install the software, such as: Brew Install wget

4. Install PIP, python setup.py install, setip.py can be obtained on SVN.

Build an iOS automation environment on your Mac

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.