Setup for Automation
Open terminal and install
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 –
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 a trusted device.
Add your device UDID to the 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 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 the device. Settings -> Developer -> Enable UI Automation Click here to read Part 4