Appium is an open source, cross-platform test automation tool for native, hybrid and mobile web apps. Appium tests can be written in your favorite Webdriver-compatible language.
Requirements & installation
1| MAC OS X 10.7 (minimum version required)
2| Xcode updated version (prefer)
3| Node.js
4| Appium.app
5| Eclipse Kepler (prefer)
6| TestNG framework
Pre-Appium setup
iOS .app file is enough to inspect elements. In this example, I have used the project, '
InternationalMountains' from Apple DEV site.
1| Download the project, '
InternationalMountains'
2| Double click and extract it
3| Import it into Xcode by opening the Xcode file
4| Run the project
5| Make sure that the simulator is opened with the application
6| Open Terminal and move to the project folder
7| Run the following command to build the .app file
xcodebuild -sdk iphonesimulator6.1
8| It will build the app and generate the file, '
InternationalMountains.app' under
/InternationalMountains/Build/Products/Release-iphonesimulator/
Appium iOS setup
1| Download & Install
Node.js
// npm represents that Node.js Package Manager
$ sudo npm install wd
2| Run the Appium server using node.js; There are couple of ways to do so..
#1 Using Node.js
//install Appium
$ npm install -g appium (or) $ sudo npm install appium -g
//start Appium server
$ appium &
#2 Using the App
Download
Appium, install and Run it
3| Now, the Appium server gets started in the default port
4723 and IP Address
0.0.0.0
i.e., [http://0.0.0.0:4723]
Appium inspector
Appium inspector is a record and playback tool just like Selenium IDE for web.
1| Open Appium
2| Change the default IP address to
127.0.0.1 and port
4725
3| Now, enable the check box, '
App path'
4| Click on the '
Choose' button and locate the .app local directory. i.e.,
InternationalMountains.app
5| Click on the '
Launch' button [Appium server launches now]
6| Now, a blue-colored icon found beside the 'Launch' button is enabled
7| Clicking blue-colored icon open up the Appium inspector with Simulator
8| Now, click the '
Record' button in Appium inspector
9| Every action will be generating a script at bottom of the Appium inspector
Run the script in Eclipse IDE