Skip to main content

How to setup Appium for mobile automation


GitHub is a code hosting platform for version control and collaboration. When a project is to be created, constant changes are made to the code. Version control systems keep these revisions straight, and store the modifications in a central repository. A repository is a location where all the files for a particular project are stored. Each project will have its own repository, and can be accessed by a unique URL.
Step 1: Install Appium-desktop-setup-1.2.6 (from the link Appium.io)
Step 2: Install JDK
Step 3: Install android studio-bundle (from developerandroid.com)
Step 4: Go to AppData->Local->Android->Sdk
Step 5: Copy the above path and set the path of a new environment variable “ANDROID_HOME”
Step 6: Copy the above path, append \tools and add it in the path variable
Steps 7: Copy the path from Step 5, append \platform-tools and add it in the path variable
Step 8: Go to AppData->Local->Android->Sdk->tools->bin->uiautomatorviewer
A window will open
Step 9: Create an emulator:
a)      Open Android Studio
b)      Click on Gradle script and let the sync complete
c)       Go to tools->Android->AVD Manager
d)      Click on Create Virtual device
e)      Select the phone model

Step 10: Add below dependencies
a)      Appium java-client 4.1.2
b)      TestNG 6.8.5
c)       Selenium-server 3.10
Step 11: Go to uiautomatorviewer and Click on “Devicescreenshot(uiautomatorDump)”  menu after that application visible on UI Automator screen but we are unable to inspect application because its developed in Unity.
We have done above setup and activity and launch the application using following program.


Note: we have tried following ways but not get any outcome.
1.       Using Sikuli we have tried to perform click actions using image recognition concept. Integrate Sikuli with Appium download following jar files:
1.       Sikuli-core-1.1.2
2.       Sikuli-script
3.       Sikuli-webdriver-1.0.1
2.       Using following code to perform action using sikuli:
Pattern image = new Pattern("C:/Users/gurneet.a.singh/workspace/AppiumDemo/Apps/SocialOcean/LoadMainScene.png");
Screen s = new Screen();
s.wait(image, 2000);
s.find(image);
s.click();

3.       Tried with touch action to perform action but didn’t get any outcome.
 TouchAction tapAction = new TouchAction(driver);
tapAction.tap(270, 1115).perform();
4.       Perform action using Appium
driver.findElement(MobileBy.className("android.view.View")).click();
Note: using above code we are perform click action on dropdown.
5.       Tried with tap action but not get any outcome.
6.       Detail of class files snapshot given below:

Comments

Popular posts from this blog

Eclipse New Maven Project: Could not resolve archetype

Close Eclipse Delete repository folder (you can find it in C:\Users{your user}.m2) Open Eclipse again. It will install maven repository automatically down v Open Window > Preferences Open Maven > Archetypes Click 'Add Remote Catalog' and add the following: Catalog File:  http://repo1.maven.org/maven2/archetype-catalog.xml Description: maven catalog

Configure Maven Project in to Jenkins and Run

As we all know, maven is a build / project management tool, based on the concept of a project object model (POM) which contains every information about your project. Maven allows a project to build using its project object model to manage builds, dependencies, releases and documentation which are all managed from the pom.xml file. Maven defines a standard way to build the projects, test, and deploy project artifacts. It provides a framework that enables easy reuse of common build logic for all projects following Maven's standards. We discussed  maven in detail  earlier here and hope you have  configured maven . First lets Create a simple maven project in Jenkins Step 1:-  Click New Items on the left menu ->Enter Project Name in “Item name” field -> Select Maven Project ->Click OK Step 2:-  Provide the job description Step 3:-  In Source Code Management, Jenkins supports CVS and Subversion out of the box, with built-in support for...

Class 1 Java introduction

What is Java Java is a  programming language  and a  platform . Java is a high level, robust, secured and object-oriented programming language. Platform : Any hardware or software environment in which a program runs, is known as a platform. Since Java has its own run time environment (JRE) and API, it is called platform. Features of Java The Java Features given below are simple and easy to understand. Simple Object-Oriented Portable Platform independent Secured Object-oriented Java is Object-oriented programming language. Everything in Java is an object. Object-oriented means we organize our software as a combination of different types of objects that incorporates both data and behavior. Basic concepts of Oops are: Object Class Inheritance Polymorphism Abstraction Encapsulation Variable Variable  is name of  reserved area allocated in memory . In other words, it is a  name of memory location . It is a...