Jumpstart iOS automation using Appium – Part 3

Click here to read Jumpstart iOS automation using Appium- Part 2

Setup for Automation

Open terminal and install

Pre-requisites :

  1. First install Homebrew .(Paste on terminal /usr/bin/ruby -e “$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)”
  2. Then Install npm (brew install node) Appium & all setup
  3. npm install -g appium (In case, you have not installed appium)
  4. npm install -g appium-doctor
  5. brew install libimobiledevice –HEAD
  6. brew install ideviceinstaller
  7. npm install -g ios-deploy
  8. gem install xcpretty (install gem before installing xcpretty : brew install gem)

Now go to WebDriverAgent folder –

cd/usr/local/lib/node_modules/appium/node_modules/appium-xcuitest-driv r/WebDriverAgent/

  1. brew install carthage
  2. npm i -g webpack
  3. Now Open WebDriverAgent.xcodeproj in Xcode. For both the WebDriverAgentLib and WebDriverAgentRunner targets, select “Automatically manage signing” in the “General” tab, and then select your Development Team. This should also auto select Signing Certificate. The outcome should look as shown here. Now build the project while the device is connected to mac via USB. It will install WebDriverAgent in the device and click on allow it as trusted device.
  4. Add your device UDID in development project. It’s required because of apple security.

Few points to check:

  • Make sure UDID is correct by checking it in Xcode Organizer or iTunes. It is a long string (20+ chars).
  • Make sure that we can run your tests against the Simulator.
  • Double check that we can invoke we automation from Instruments.
  • Make sure Instruments is not already running.
  • Make sure the device is connected to mac via USB and developer mode is active.
  • Make sure UI Automation is enabled on device. Settings -> Developer -> Enable UI Automation

Reference – https://appium.readthedocs.io/en/stable/en/appium-setup/real-devices-ios

Click here to read Part 4

Govinda Raj

2 thoughts on “Jumpstart iOS automation using Appium – Part 3

Leave a Reply

Your email address will not be published.