Installation and Configuration of Appium on Windows with a First Program for a Quick Start:
Appium is a free and open-source test automation tool that is widely used for testing mobile applications. It allows users to test different types of mobile apps, including Native, Hybrid, and Mobile Web, using the standard WebDriver library.
Recommended IPTV Service Providers
- IPTVGREAT – Rating 4.8/5 ( 600+ Reviews )
- IPTVRESALE – Rating 5/5 ( 200+ Reviews )
- IPTVGANG – Rating 4.7/5 ( 1200+ Reviews )
- IPTVUNLOCK – Rating 5/5 ( 65 Reviews )
- IPTVFOLLOW -Rating 5/5 ( 48 Reviews )
- IPTVTOPS – Rating 5/5 ( 43 Reviews )
There are three different types of Mobile Apps:
- Native Apps: These apps are built using iOS, Android, or Windows SDKs. They are platform-specific and designed to work on specific platforms and/or devices.
- Hybrid Apps: Hybrid apps are web applications developed using HTML, CSS, and a native application wrapper like UIWebView for iOS and “webview” for Android apps.
- Mobile Web Apps: Mobile web apps are accessed through mobile browsers.
List Of Tutorials In This Appium Series
Tutorial #1: Appium Tutorial For Beginners (This Tutorial)
Tutorial #2: Introduction To Appium: What is Appium And Its Architecture
Tutorial #3: Download, Install And Setup Appium For Windows
Tutorial #4: Configuring Mobile Device With System In Appium
Tutorial #5: Automate Native App On Android Device Using Appium
Tutorial #6: How To Automate Web App On Chrome Browser In Android Device
What You Will Learn:
- Why Is Appium A Popular Tool For Automating Mobile Apps?
- Setting Up The Appium Tool On Windows
- Setup Appium With Eclipse IDE
- Limitations Of Appium
- Challenges Faced While Working With Appium
Why Is Appium A Popular Tool For Automating Mobile Apps?
Appium is a “cross-platform tool,” meaning it allows you to write tests for multiple platforms (iOS, Android, Windows) using the same APIs. With Appium, you can also run automated tests on actual devices like tablets and mobile phones.
It is widely used for regression testing of mobile apps on various devices. Appium simplifies mobile app regression testing, especially for large apps that are frequently updated with new features and functionalities.
Setting Up The Appium Tool On Windows
Prerequisites: To automate mobile app testing using Appium, you will need the following software and hardware:
- Your PC should have JDK, Appium Server, Eclipse, and Android SDK installed
- Apk: Mobile Application to be automated
- Testing Device: In this case, we will use a Moto G device
- Jars: Java-client jars and Selenium Jars
- USB driver for Testing Device: In this case, a Moto G device
Step #1: Install the Java Development Kit (JDK)
Step #2: Set up Java Environment Variable Path
Step #3: Download and install Android SDK here and update the APIs
To update API, open Eclipse, click on Window in the Eclipse Menu, and select Android SDK manager
Update the APIs as shown in the below screenshot:
Step #4: Download and install Appium for Windows from here
Step #5: Install Node JS from here
Step #6: Set the ANDROID_HOME path as well as the JAVA_HOME path
Specify the path for tools and platform-tools present in the Android SDK path
These folders would be present in adt-bundle-windows-x86_64-20140702sdk
Now we need to update the Environment variable (Refer below Screenshot)
(Note: Click on any image for an enlarged view)
Update the path with tools and platform-tools (folders present in the Android SDK)
The entry in Path will look as below:
Step #7: Access adb
Press Win+R keys combination
Type CMD. Now in CMD type ‘adb’. adb will be accessible
Preparing Mobile Device For Automation With Appium
Connect your Mobile Testing device via USB to PC. Enable Developer Mode on Mobile Phone before automating the app.
Steps to Enable Developer Mode/Options on Android Phone or Tablet:
1) Open Settings, Tap on ‘About’ Option, Tap on ‘Software Information’, Tap On ‘More’.
2) Tap on “Build number” 7 times to enable Developer options.
3) Go back to Settings and make sure that the “Developer options” setting is there.
4) Tap on Developer options and turn on the USB Debugging option from the menu on the next screen.
For more help, follow this link.
5) Download and install USB Drivers for the Mobile Testing device on PC.
6) In the adb terminal, type ‘adb devices’
List of devices attached
This will display the list of devices connected to the system. We will be using the Sample Contact Manager.apk as a sample App to automate. Download and install Contact Manager.apk on the device.
Starting Automating Android App Using Appium
Now run the appium.exe on PC.
Appium needs to be running and pass the following parameters and Device Name in Android Settings.
Note: Don’t change the port number or anything in the general setting icon. When the Appium Server starts, the Server address and Port address will be set by default. The port address will be 4723 by default.
In Android Setting, the user needs to set the APK path where the APK is located, Check app path, package, and launch Activity.
- Connect your Android phone to PC and turn on USB debugging mode.
- Open Command prompt.
- Type command ‘adb logcat’.
- Open the app on your android phone. Immediately press ‘CTRL + C’ in the command prompt
‘com.example.android.contactmanager’ is the package name and ‘com.example.android.contactmanager.ContactManager’ is the activity name of the Contact Manager app.
In the above screenshot, we have populated all the needed information in Appium i.e the package, launch activity, and Mobile Device Name.
How To Locate Element Using UIAutomatorViewer?
1) To automate the App, we first need to find the elements of the app that we need to interact with, for which we will use ‘UIAutomatorViewer’.
2) Connect the device in which the App is installed to the PC.
3) Go to Terminal.
Type ‘adb devices’.
List of devices attached
This will show the list of devices connected to your PC.
4) Open the App that you want to automate on the Mobile Device.
5) Open UIAutomatorViewer from the following path:
6) Make sure your App is launched and UIAutomatorViewer is also launched. Click on ‘Device screenshot’.
7) This option will take a screenshot of the App with all the detailed information of all the elements visible on the App.
Click on the ‘Add contact’ button for our Test Scenario.
From the above screenshot, we can use the locator ‘By.name(“Add Contact”)’.