https://github.com/destafajri/java-appium
My Source Code of Appium-Java for mobile testing
https://github.com/destafajri/java-appium
appium-framework java mobile-testing
Last synced: about 1 month ago
JSON representation
My Source Code of Appium-Java for mobile testing
- Host: GitHub
- URL: https://github.com/destafajri/java-appium
- Owner: destafajri
- Created: 2022-08-09T05:09:45.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2022-09-02T02:34:21.000Z (over 2 years ago)
- Last Synced: 2025-01-27T06:45:34.169Z (3 months ago)
- Topics: appium-framework, java, mobile-testing
- Language: HTML
- Homepage:
- Size: 132 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Java-Appium
My Source Code of Java-Appium for mobile testingHow to Install appium
Installing appium with Node.js
Step 1 : Check if node.js is installed on your system node --version npm --version
Step 2 : Download node.js installer https://nodejs.org/en/download/
Step 3 : Run the installer & install node.js & npm
Step 4 : Check if node.js & npm are installed
node --version npm --version
where node
where npmStep 5 : Install appium with node.js
npm install -g appiumStep 6 : Check if appium is installed
appium -v
where appiumStep 7 : Start appium
appiumInstalling appium with APPIUM DESKTOP CLIENT
Step 1 : Download appium desktop client
http://appium.io/
https://github.com/appium/appium-desk...Step 2 : Install appium desktop client
Step 3 : Start appium through appium desktop client
To check appium installation & dependencies
Install appium-doctor
https://github.com/appium/appium-doctor
npm install appium-doctor -g
appium-doctor -h
appium-doctor --androidHow to run appium with emulator
https://www.seleniumeasy.com/appium-tutorials/running-appium-tests-on-android-emulatorI suggest you to download Android Studio, because it inclucded SDK
And dont forget to make System variable on the Environment system
ANDROID_HOME C:\Users\ASUS\AppData\Local\Android\Sdkand also PATH
%ANDROID_HOME%\platform-tools
%ANDROID_HOME%\toolsif you got "error has terminated solution for emulator img" you can check
https://stackoverflow.com/questions/57122856/error-while-downloading-google-apis-intel-x86-atom-system-image
https://blog.andevindo.com/the-emulator-process-for-avd-has-terminated-error-log/
https://www.youtube.com/watch?v=bOURCXjmXlgHow to make appium project
Step 1 : Open Eclipse IDE
Step 2 : Create a Java maven project
Step 3 : Add libraries
Selenium java
Appium java client
https://mvnrepository.com/Step 4 : Connect device
run command : adb devicesStep 5 : Start appium server
can do from command line or appium desktop clientStep 6 : Add code to start automation on mobile device
Set desired capabilities
deviceName
udid
platformName
platformVersionappPackage
appActivitythis is the URL http://127.0.0.1:4723/wd/hub
Start applicationStep 7 : Run and validate
How to use UIAutomatorViewer for Object Locators
Step 1 : Connect mobile device to computer system through cable OR through wifi OR open your emulator
Step 2 : Run command adb devicesStep 3 : Start UIAutomatorViewer
Windows - goto android-sdk/tools/bin
Mac - from terminal run command uiautomatorviewerStep 4 : Open the application on mobile device and capture on uiautomatorviewer to find element locators
How to make appium test projectStep 1 : Open Eclipse
Step 2 : Install TestNG in eclipse
Step 3 : Create a new maven project
Step 4 : Add required lib/dependencies
Appium java client
Selenium java
TestNG
Step 5 : Save - Clean - Build project
Step 6 : Create 2 folders under src/test/java
tests
pages
Step 7 : User src/test/resources create a folder
apps
will keep application files (.apk, .ipa, .app)
Step 8 : Inside tests folder create a class - BaseClass
Step 9 : Create setup & afterTest functions
Annotate with testng annotations
Step 10 : Add code for desired capabilities
Step 11 : Attach mobile device (or make emulator ready)
adb devices
get id and platform ver and add in desired capabilities
Step 12 : Start appium server
Step 13 : Run & test
Step 14 : Add test class and extend BaseClassAppium Automation Framework from scratch
Eclipse Java Maven TestNG
Step by Step
Can follow on Windows & MacWhat we will do:
1. Create a java maven project in eclipse
2. Add required libraries
3. Create classes and functions
4. Add desired capabilities
5. Setup mobile device and appium
6. Create tests for mobile test automation
7. Run and test