Setup for AutomationOpen terminal and install Pre-requisites :
- First install Homebrew .(Paste on terminal /usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
- Then Install npm (brew install node) Appium & all setup
- npm install -g appium (In case, you have not installed appium)
- npm install -g appium-doctor
- brew install libimobiledevice --HEAD
- brew install ideviceinstaller
- npm install -g ios-deploy
- 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/
- brew install carthage
- npm i -g webpack
- 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.
- 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
By: Govinda Raj