Appiumā€Šā€”ā€ŠArticle #1

šŸ“±Invoke an App in Mobile ā€” Appium

Learn Desired Capabilities to invoke the app in mobile

Fareena Imran
CodixLab

--

In this article, weā€™re going to learn about appium desired capabilities to invoke the app on the mobile. So Letā€™s get started šŸ‘‡

Prerequisites:

  1. Create a project and class in eclipse that I have taught in one of my articles, I recommend you to go through that article first.

2. Download and install the ā€œApiDemos-debug.apkā€ app on which we will run our test case.

3. Copy and paste the ā€œApiDemos-debug.apkā€ in the src folder to access the file.

Letā€™s Do Coding šŸ’»

  1. After creating the class, you need to create an object (caps) of desired capabilities class and import it into the class like this šŸ‘‡

2. Now, give the information to automate the test on the device so for this we use setCapabilities šŸ‘‡

3. Here are some information that is required to invoke an app in your mobile.

Copy and paste the ā€œApiDemos-debug.apkā€ in the src folder to access the file

Explain The Code

āœ” Desired Capabilities

Desired Capabilities is a class uses to set basic requirements, we basically wrap all the requirements in desired capabilitiesā€™ object and send this information to the actual driver.

āœ” File

We used the File class to access the ā€˜.apkā€™ file from the src folder.

āœ” UiAutomator2

UiAutomator is introduced by Google who invented Android. Itā€™s a testing framework that is used for automating android apps. So, we don't directly test our apps on mobile we use a mediator i.e. ā€œUiAutomator2ā€.

Appium cloned this UiAutomator framework repository and made some customized changes and give a name to it as ā€œUiAutomator2ā€. So to test the app on mobile weā€™re using ā€œUiAutomator2ā€.

āœ” AndroidDriver

This driver is a part of Appium Mobile Test Automation tool that controls all the automation.

Code To Use

Follow all the articles to learn Appium from scratch.

If you find this post useful, please tap šŸ‘ button below šŸ˜Š

Best of Luck šŸ‘

--

--

Fareena Imran
CodixLab
Writer for

SQA Engineer| Tech Writer | Write stories about SQA