In the mobile automation testing we consider two major Operating Systems (OS) for our mobile application automation.
- Android
- iOS
For many of us it is quite easy to do Android application automation using Appium, some programming languages and integrated with some specific Automation Framework ( most of the time it will be hybrid framework to be honest)
In this article let me explain and guide you through and answer the question "How to do automation of an application running on iPhone"
First of all, lets begin with the pre-requisites- please make sure your have installed the following
- Install the Xcode-
- Install Python-
- Let's take the latest version of python - I am considering Latest version of python 3.7.x please follow the instructions given in the link for the proper installations
- Once you install python on your machine, just type "python --version" for 2.7 and "python3 --version" for 3.x versions.
- By default, Mac OS comes with python 2.7 base version, based on my need, to execute automation using latest python version, I have installed 3.7 version- the benefits I get are latest supported libraries, code style and some PEP8 standards (This is my thought process)
- Install Appium Latest Version-
- As we all know, Appium is an open source mobile automation tool used to automate the Android and iOS applications predominantly - native, hybrid and mobile web application testing and supports automation test on physical devices as well as an emulator or simulator
- Download your latest Appium version here
- Right click on downloaded file and drag Appium to Applications folder
- Install the Appium Python Client - study more about Appium python client here
- Various client libraries in Python, Java, C#, Ruby, JavaScript which supports Appium's extension to the web driver protocol
- While using Appium, the client libraries should be used rather than the regular web-driver agent
- Execute the following command on your terminal ( I am only referring to Python 3.x version here, hence using pip3)
pip3 install Appium-Python-Client
- Download and Install PyCharm IDE-
- PyCharm is an IDE used for python scripting, and most of our Python based automation framework are predominantly developed using this powerful IDE from JetBarins - read more about PyCharm here.
- Follow the link - https://www.jetbrains.com/pycharm/download/ to download the PyCharm
- I prefer to download the community edition for my coding. If you organization can pay for you to get Professional version, please do so.
- Open the downloaded file and drag it to Application folder
- Go to the Applications directory and double click on “PyCharm ” to install on Mac OS
- Install Appium Desktop-
- Appium desktop is an opensource GUI interface for defining certain automation configurations for both Android and iOS, supported on Mac OS, Windows and Linux based OS.
- Basically, Appium has two important major components
- Appium Server- Enables the Automation execution for the Applications
- Appium Inspector- Inspects and gets the locators of a page on the application
- The Appium desktop can be found here
- Open the above link which will redirect you to following page
Conclusion-Hope we will all get successful set up on Mac OS. Now, what next?I will bring in part 2 and explain how we can execute automation script on iPhone step by step with the help of all the set up we followed here.Now, this setup should be ready for the automation process.