2. How we start
from scratch..
InstallAndroid Studio
https://developer.android.com/studio
Set environment paths to tools and platform tools folder.
Plug your mobile device to your machine after enabling USB
debugging in your android device.
Next run adb devices command to see and identify the name of
your android device.
3. Installing the
Appium server
Install NodeJS….
https://nodejs.org/dist/v10.15.1/node-v10.15.1-x64.msi
Install appium in NodeJS
npm install –g appium@1.8.0
Run this command in command prompt where stable version 1.8.0
will be installed in your machine.
After installation run appium –a 127.0.0.1 in a separate command
window which should be invoked as Run AsAdministrator.
4. Next lets
install the
sample
application in
your device…
Download the eribank apk to your android device.
http://code.google.com/p/eribank/downloads/list
Go to your eclipse IDE and have maven integration plug-in &Test
NG installed.
Next create a new maven simple project in eclipse.
In the pom.xml file add your Selenium dependency.
https://mvnrepository.com/artifact/org.seleniumhq.selenium/seleni
um-java/3.141.5
5. Lets move to
the next steps
ofAppium test
automation…
Selenium dependency
<dependency>
<groupId>org.seleniumhq.selenium</groupId>
<artifactId>selenium-java</artifactId>
<version>3.141.5</version>
</dependency>
Carryout a maven clean and install to install all the Selenium
– Java libraries into your machine.
Finally lets add the simple Appium code and run an
automation script…
6. Lets run the
appium
automation
code…
Create a package calledTestBankPkg and a class called
BankAppTest.java
Next add the code given in the git hub URL
https://github.com/lkkushan101/Java_Appium_Example/blob/maste
r/src/main/java/TestBankPkg/BankAppTest.java
Please do remember to change the desired capabilities according to
your android device.
Run the script via Run As ->Test NG…