IOS Mobile Automation Set up
Steps and Summaries:
- Install IDE, Xcode, and require components for working automation code
- Install libraries that required to run automation code
- Set environment variables that necessary to run automation code
Install node js and appium
- Download node js here
- install node js
- To download and install Appium with the terminal, follow the command below
npm install - g appium
Note: in case, no permission and after you install with the command above and found the error “EACCES: permission denied, …..” you can use the command below
sudo npm install -g appium --unsafe-perm=true --allow-root
If you want to set permission on your local machine you can follow the step
- Open the terminal with the command
Open ~/.zshc
2. write the scrip follow below
export PATH=usr/local/share/npm/bin:$PATH
3. install Appium doctor
what is Appium doctor can use to check whether all the prerequisites/dependencies/installation required for installing Appium.
sudo npm install -g appium-doctor --unsafe-perm=true --allow-root
- Install Xcode
xcode-select --install
1. Install XCUITest Driver (using Appium CLI)
npm i appium-xcuitest-driver
2. Install Carthage [dependency manager, required for WebDriverAgent]
brew install Carthage
Start the simulator with Appium inspector
We can practice automation ios with UIKitCattalog for sample guides you through several types of customizations you can make in your iOS automation test.
- Download UIKitCattalog
2. Build UIKitCatalog app for the simulator
Open UIKitCatalog as a download
piya@MacBook-Pro ~% cd /Users/piya/Downloads/ios-uicatalog-master/UIKitCatalog
piya@MacBook-Pro UIKitCatalog % npm install
Then you will get UIKitCatalog-iphonesimulator
- Create Device
Start with UIKitCatalog app using Appium CLI
Get UDID with the command
xcrun simctl list
Open Xcode
Launch Appium on Mac OS
Now, open the Appium app from ‘Application’ and start the Appium Server.