Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Table of Contents

Qualitia uses third-party software components, which needs to be downloaded separately for successful mobile test automation.

In order to prepare your Mac for mobile automation testing, you need to download and install Appium and Xcode.

Download and Install Appium Desktop and Xcode

Appium is an open source test automation tool for mobile applications. Appium comes equipped with Inspector for object identification.

  1. Download and install Appium.
    It is recommended to install Appium in the Applications directory.
  2. Download and install the latest version of Xcode 8.3 (from the app store).

Download Simulators

You need to download the required simulators if you want to execute test cases on simulators. 

To download simulators:

  1. Open the Xcode application using Launchpad on Mac.
  2. Click Xcode > Preferences.
  3. Select Components from the top. 
    All the available simulators are listed here.
  4. Select one or more simulators from the list to download.
    A pop-up appears asking password.
  5. Enter Password and then click Install Software. 

Install and Configure Appium Dependencies for iOS Physical Device on Mac

In order to prepare your Mac for automating test cases on iOS physical device, please install following components using terminal after you have downloaded Appium Desktop and Xcode.

Note

For automating test cases on simulators, you do not need to download and install these components.

For more information on these dependencies, GitHub or Appium Documentationdocumentation.

  1. Install Homebrew, if not present.
    1. To check whether Homebrew is installed, execute the following command in terminal: brew --version
    2. To install Homebrew, execute the following command in terminal: /usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
      Once completed, confirm the installation executing brew --version command.
  2. Install Node js, if not present.
    1. To check whether Node js is installed, execute the following command in terminal: npm --version
    2. To install Node js, execute following commands in terminal: brew update and brew install node.
      Once completed, confirm the installation executing npm --version command.
  3. Launch terminal and install packages using the following commands:
    • brew install libimobiledevice --HEAD: this command installs libimobiledevice.
    • brew install ideviceinstaller: this command installs ideviceinstaller required for iOS 9.
    • npm install -g ios-deploy: this command installs iOS-deploy required for iOS 10.
    • gem install xcpretty: this command installs xcpretty.
    • brew install ios-webkit-debug-proxy: this installs iOS Web kit debug proxy. 
    • brew install carthage: this command installs carthage dependency manager.
  4. Configure WebDriver Agent project using the following steps:
    1. Download WebDriverAgent xcode project from GitHub.
    2. Extract the downloaded WebDriverAgent-master.zip. 
    3. Rename extracted folder to WebDriverAgent.
    4. Copy and replace the extracted folder to /Applications/Appium.app/Contents/Resources/app/node_modules/appium/node_modules/appium-xcuitest-driver/WebDriverAgent.
      /Applications is the location where you have installed Appium server. In case Appium is installed on different directory, replace the above path accordingly.
    5. Launch terminal and go to /Applications/Appium.app/Contents/Resources/app/node_modules/appium/node_modules/appium-xcuitest-driver/WebDriverAgent.
    6. Execute command: ./Scripts/bootstrap.sh
    7. Launch Finder and go to the same location mentioned above. 
    8. Double-click WebDriverAgent.xcodeproj.
      This launches the Xcode. 
    9. Connect your physical device and select it using the drop-down list from the top menu bar.
    10. Add developer account in Xcode, if not added.
      For more information on adding developer account, click here
    11. Select each Target from the General section, select the Automatically Manage Signing check box from the Signing section.
    12. Select the developer account details from the Team drop-down list for each Target.

      Expand
      titleView Image


    13. From the top menu items, select Product > Build For > Testing
      Xcode then builds the WedDriver agent project for testing. If the project builds successfully, your Mac setup is ready for testing.
      If the build fails, click here for troubleshooting.

Turning on the Automation Support on Safari (Mac) 

Anchor
Turning on the WebDriver Support
Turning on the WebDriver Support
Enable the Develop Menu on Safari

The Develop menu can be turned on by following the steps mentioned below.

  1. Launch the Safari browser.
  2. Go to Safari > Preferences > Advanced.
  3. Ensure that Show Develop menu check box is selected.

Enable Remote Automation in the Develop Menu

  1. Launch the Safari browser.
  2. Go to Develop > Allow Remote Automation.