SlideShare a Scribd company logo
Mobile testing Automation
using Appium for Android
Aliaa Monier
Eclipse IDE for Java
SeleniumWebDriver
Agenda
• What is Appium?
• Appium Architecture
• How Appium works in Android?
• Installation Summary.
• Turn On USB Debugging on Android Device.
• Find appPackage and appActivity name of Android app.
• UIAutomatorViewer 101.
• First AppiumTest Script ~ Demo.
• AppiumTest Script usingTestNG ~ Demo
• References.
What is Appium?
• Appium is an open source test automation tool developed
and supported by Sauce Labs to automate native and
hybrid mobile apps.
• It is basically known as a Cross-Platform Mobile Automation
Tool.
• It uses JSONWire Protocol internally to interact with iOS
and Android native apps using the SeleniumWebDriver.
Appium Architecture
• Appium is a HTTP server written in node.js which creates
and handles multiple WebDriver sessions for different
platforms like iOS and Android.
• Appium starts a “test case” on the device that hosts a
server and listens for proxies commands from the
main Appium server.
• Appium perceives HTTP requests from selenium client
libraries and it handles those requests in different ways
depending upon the platforms.
How Appium works in Android?
Bootstrap.jar
UIAutomator
Command
Server
TCP Server
Webdriver Script
driver.findElement(By.id("sear
ch_box_idle_text")).setValue("
Google");
WebDrivercontroller
UIAutomator
Controller
(Android)
UIAutomator
Command
Client
TCP Client
Installation Summary
JAVA
• Download and Install Java JDK.
• Setup Java Environment Variables.
Android
• Download and Install Android Studio.
• Install additional Android SDK tools (adb , UIAutomatorViewer…)
• Setup Android Environment Variables.
NodeJs
• Download and Install NodeJs.
Appium
• Download and Install Appium Desktop Client.
• Download Appium Jars for Eclipse ( SeleniumWebDriver Jars & Appium Java Client Jar )
Eclipse
• Download and Install Eclipse IDE for Java.
• Create Eclipse project and add Appium JAR files to your Project.
TestNG
• Install TestNG Eclipse plugin.
Turn On USB Debugging on Android Device
Enabling USB Debugging on your android device is a two step
process:
• First, get the Developer options on your phone
• Then, use Developer options to enable USB Debugging
Turn On USB Debugging on Android Device
Find appPackage and appActivity name of Android app
1 - Unlock your mobile device and connect it to your computer using USB cable.
2 - Open Command Prompt and run the command : adb devices We are running this command to
just make sure that your mobile is properly connected.
3 - Run ‘adb shell’ command.
4 - Now in your mobile phone, open the app for which you want to find the appPackage and
appActivity.
5 - Now run this command: dumpsys window windows | grep -E ‘mCurrentFocus’
UIAutomatorViewer 101
1 - Uniquely identify the element in mobile application:
• Open command prompt
• Type uiautomatorviewer and
then hit Enter
• Wait for a couple of seconds ,
UIAutomatorViewer window
would open as shown.
UIAutomatorViewer 101
2 - Perform action on the identified element.
• Make sure that your mobile phone is connected properly with
USB. Also, ensure that it is unlocked and your app is opened
• Now click on Device Screenshot icon in UIAutomatorViewer.
UIAutomatorViewer 101
UIAutomatorViewer 101
Different ways to identify elements using Appium:
• Find element by ID
• Find element by ClassName
• Find element byTag Name
• Find element by Accessibility ID
• Find element by XPath
Demo
First AppiumTest Script
• Start Appium Server
• Get your Mobile Phone’s Device ID
• Get your Mobile Phone’s Android version
• Find out appPackage and appActivity names of the mobile app
• Write AppiumTest Script
• Run AppiumTest Script
AppiumTest Script usingTestNG
References
http://toolsqa.com/mobile-automation/appium/appium-a-cross-platform-mobile-automation-tool/
http://www.automationtestinghub.com/appium-tutorial/
http://toolsqa.com/mobile-automation/appium/appium-test-using-testng/

More Related Content

What's hot

Mobile Test Automation - Appium
Mobile Test Automation - AppiumMobile Test Automation - Appium
Mobile Test Automation - Appium
Maria Machlowska
 
Mobile automation testing with selenium and appium
Mobile automation testing with selenium and appiumMobile automation testing with selenium and appium
Mobile automation testing with selenium and appium
BugRaptors
 
Mobile Automation with Appium
Mobile Automation with AppiumMobile Automation with Appium
Mobile Automation with Appium
Manoj Kumar Kumar
 
Testing Native iOS Apps with Appium
Testing Native iOS Apps with AppiumTesting Native iOS Apps with Appium
Testing Native iOS Apps with AppiumSauce Labs
 
Getting started with appium
Getting started with appiumGetting started with appium
Getting started with appium
Pratik Patel
 
Testing Native Apps at PAYBACK
Testing Native Apps at PAYBACKTesting Native Apps at PAYBACK
Testing Native Apps at PAYBACK
Marcel Gehlen
 
Appium - test automation for mobile apps
Appium - test automation for mobile appsAppium - test automation for mobile apps
Appium - test automation for mobile apps
Aleksejs Trescalins
 
Automation Testing With Appium
Automation Testing With AppiumAutomation Testing With Appium
Automation Testing With Appium
Knoldus Inc.
 
Appium: Mobile Automation Made Awesome
Appium: Mobile Automation Made AwesomeAppium: Mobile Automation Made Awesome
Appium: Mobile Automation Made Awesome
Netcetera
 
Appium - Reality check on the world’s leading Open Source Framework for Mobil...
Appium - Reality check on the world’s leading Open Source Framework for Mobil...Appium - Reality check on the world’s leading Open Source Framework for Mobil...
Appium - Reality check on the world’s leading Open Source Framework for Mobil...
Asaf Saar
 
Future of Mobile Automation, Appium Steals it
Future of Mobile Automation, Appium Steals itFuture of Mobile Automation, Appium Steals it
Future of Mobile Automation, Appium Steals it
Srinivasan Sekar
 
Using Selenium to Test Native Apps (Wait, you can do that?)
Using Selenium to Test Native Apps (Wait, you can do that?)Using Selenium to Test Native Apps (Wait, you can do that?)
Using Selenium to Test Native Apps (Wait, you can do that?)Sauce Labs
 
Automation With Appium
Automation With AppiumAutomation With Appium
Automation With Appium
Knoldus Inc.
 
Appium
AppiumAppium
Appium
Sveta Fedik
 
On boarding Appium Open Source
On boarding Appium Open SourceOn boarding Appium Open Source
On boarding Appium Open Source
Asaf Saar
 
Appium overview
Appium overviewAppium overview
Appium overview
Abhishek Yadav
 
Selenium, Appium, and Robots!
Selenium, Appium, and Robots!Selenium, Appium, and Robots!
Selenium, Appium, and Robots!
hugs
 
Appium
AppiumAppium
Appium tutorial| Appium Training
Appium tutorial| Appium Training Appium tutorial| Appium Training
Appium tutorial| Appium Training
QA Masters
 
Appium solution
Appium solutionAppium solution
Appium solution
Nael Abd Eljawad
 

What's hot (20)

Mobile Test Automation - Appium
Mobile Test Automation - AppiumMobile Test Automation - Appium
Mobile Test Automation - Appium
 
Mobile automation testing with selenium and appium
Mobile automation testing with selenium and appiumMobile automation testing with selenium and appium
Mobile automation testing with selenium and appium
 
Mobile Automation with Appium
Mobile Automation with AppiumMobile Automation with Appium
Mobile Automation with Appium
 
Testing Native iOS Apps with Appium
Testing Native iOS Apps with AppiumTesting Native iOS Apps with Appium
Testing Native iOS Apps with Appium
 
Getting started with appium
Getting started with appiumGetting started with appium
Getting started with appium
 
Testing Native Apps at PAYBACK
Testing Native Apps at PAYBACKTesting Native Apps at PAYBACK
Testing Native Apps at PAYBACK
 
Appium - test automation for mobile apps
Appium - test automation for mobile appsAppium - test automation for mobile apps
Appium - test automation for mobile apps
 
Automation Testing With Appium
Automation Testing With AppiumAutomation Testing With Appium
Automation Testing With Appium
 
Appium: Mobile Automation Made Awesome
Appium: Mobile Automation Made AwesomeAppium: Mobile Automation Made Awesome
Appium: Mobile Automation Made Awesome
 
Appium - Reality check on the world’s leading Open Source Framework for Mobil...
Appium - Reality check on the world’s leading Open Source Framework for Mobil...Appium - Reality check on the world’s leading Open Source Framework for Mobil...
Appium - Reality check on the world’s leading Open Source Framework for Mobil...
 
Future of Mobile Automation, Appium Steals it
Future of Mobile Automation, Appium Steals itFuture of Mobile Automation, Appium Steals it
Future of Mobile Automation, Appium Steals it
 
Using Selenium to Test Native Apps (Wait, you can do that?)
Using Selenium to Test Native Apps (Wait, you can do that?)Using Selenium to Test Native Apps (Wait, you can do that?)
Using Selenium to Test Native Apps (Wait, you can do that?)
 
Automation With Appium
Automation With AppiumAutomation With Appium
Automation With Appium
 
Appium
AppiumAppium
Appium
 
On boarding Appium Open Source
On boarding Appium Open SourceOn boarding Appium Open Source
On boarding Appium Open Source
 
Appium overview
Appium overviewAppium overview
Appium overview
 
Selenium, Appium, and Robots!
Selenium, Appium, and Robots!Selenium, Appium, and Robots!
Selenium, Appium, and Robots!
 
Appium
AppiumAppium
Appium
 
Appium tutorial| Appium Training
Appium tutorial| Appium Training Appium tutorial| Appium Training
Appium tutorial| Appium Training
 
Appium solution
Appium solutionAppium solution
Appium solution
 

Similar to Appuim 101

Appium Presentation
Appium Presentation Appium Presentation
Appium Presentation
OmarUsman6
 
appiumpresent-211128171811.pptx projet de presentation
appiumpresent-211128171811.pptx projet de presentationappiumpresent-211128171811.pptx projet de presentation
appiumpresent-211128171811.pptx projet de presentation
EnochBidima3
 
[@NaukriEngineering] Mobile Web app scripts execution using Appium
[@NaukriEngineering] Mobile Web app scripts execution using Appium[@NaukriEngineering] Mobile Web app scripts execution using Appium
[@NaukriEngineering] Mobile Web app scripts execution using Appium
Naukri.com
 
Android Application Development Using Java
Android Application Development Using JavaAndroid Application Development Using Java
Android Application Development Using Java
amaankhan
 
Appium- part 1
Appium- part 1Appium- part 1
Appium- part 1
Mithilesh Singh
 
ATAGTR2017 Appium
ATAGTR2017 AppiumATAGTR2017 Appium
ATAGTR2017 Appium
Agile Testing Alliance
 
Mobile Application Testing
Mobile Application Testing Mobile Application Testing
Mobile Application Testing
Shivaraj R
 
Mobile Application Testing
Mobile Application TestingMobile Application Testing
Mobile Application Testing
Sun Technlogies
 
Automation using Javascript
Automation using JavascriptAutomation using Javascript
Automation using Javascript
khanhdang1214
 
Appium Meetup #2 - Mobile Web Automation Introduction
Appium Meetup #2 - Mobile Web Automation IntroductionAppium Meetup #2 - Mobile Web Automation Introduction
Appium Meetup #2 - Mobile Web Automation Introduction
snevesbarros
 
Mobile test automation in simple steps
Mobile test automation in simple stepsMobile test automation in simple steps
Mobile test automation in simple steps
Kushan Shalindra Amarasiri - Technical QE Specialist
 
b4usolution_Appium Mobile Automation Testing Made Awesome
b4usolution_AppiumMobile Automation Testing Made Awesomeb4usolution_AppiumMobile Automation Testing Made Awesome
b4usolution_Appium Mobile Automation Testing Made Awesome
b4usolution .
 
The ultimate guide to mobile app testing with appium
The ultimate guide to mobile app testing with appiumThe ultimate guide to mobile app testing with appium
The ultimate guide to mobile app testing with appium
headspin2
 
Automated Mobile Testing using Appium.pdf
Automated Mobile Testing using Appium.pdfAutomated Mobile Testing using Appium.pdf
Automated Mobile Testing using Appium.pdf
Anand722237
 
Appium.pptx
Appium.pptxAppium.pptx
Appium.pptx
SameerAlam82
 
[Srijan Wednesday Webinar] Mastering Mobile Test Automation with Appium
[Srijan Wednesday Webinar] Mastering Mobile Test Automation with Appium[Srijan Wednesday Webinar] Mastering Mobile Test Automation with Appium
[Srijan Wednesday Webinar] Mastering Mobile Test Automation with Appium
Srijan Technologies
 
Appium_set_up
Appium_set_upAppium_set_up
Appium_set_up
Mithilesh Singh
 
Appium Mobile Testing - Nakov at js.talks() Conference - Nov 2021
Appium Mobile Testing - Nakov at js.talks() Conference - Nov 2021Appium Mobile Testing - Nakov at js.talks() Conference - Nov 2021
Appium Mobile Testing - Nakov at js.talks() Conference - Nov 2021
Svetlin Nakov
 
Automation using Appium
Automation using AppiumAutomation using Appium
Automation using Appium
Livares Technologies Pvt Ltd
 

Similar to Appuim 101 (20)

Appium Presentation
Appium Presentation Appium Presentation
Appium Presentation
 
appiumpresent-211128171811.pptx projet de presentation
appiumpresent-211128171811.pptx projet de presentationappiumpresent-211128171811.pptx projet de presentation
appiumpresent-211128171811.pptx projet de presentation
 
[@NaukriEngineering] Mobile Web app scripts execution using Appium
[@NaukriEngineering] Mobile Web app scripts execution using Appium[@NaukriEngineering] Mobile Web app scripts execution using Appium
[@NaukriEngineering] Mobile Web app scripts execution using Appium
 
Android Application Development Using Java
Android Application Development Using JavaAndroid Application Development Using Java
Android Application Development Using Java
 
Appium- part 1
Appium- part 1Appium- part 1
Appium- part 1
 
ATAGTR2017 Appium
ATAGTR2017 AppiumATAGTR2017 Appium
ATAGTR2017 Appium
 
Mobile Application Testing
Mobile Application Testing Mobile Application Testing
Mobile Application Testing
 
Mobile Application Testing
Mobile Application TestingMobile Application Testing
Mobile Application Testing
 
Automation using Javascript
Automation using JavascriptAutomation using Javascript
Automation using Javascript
 
Appium Meetup #2 - Mobile Web Automation Introduction
Appium Meetup #2 - Mobile Web Automation IntroductionAppium Meetup #2 - Mobile Web Automation Introduction
Appium Meetup #2 - Mobile Web Automation Introduction
 
Mobile test automation in simple steps
Mobile test automation in simple stepsMobile test automation in simple steps
Mobile test automation in simple steps
 
b4usolution_Appium Mobile Automation Testing Made Awesome
b4usolution_AppiumMobile Automation Testing Made Awesomeb4usolution_AppiumMobile Automation Testing Made Awesome
b4usolution_Appium Mobile Automation Testing Made Awesome
 
The ultimate guide to mobile app testing with appium
The ultimate guide to mobile app testing with appiumThe ultimate guide to mobile app testing with appium
The ultimate guide to mobile app testing with appium
 
Automated Mobile Testing using Appium.pdf
Automated Mobile Testing using Appium.pdfAutomated Mobile Testing using Appium.pdf
Automated Mobile Testing using Appium.pdf
 
Google app engine
Google app engineGoogle app engine
Google app engine
 
Appium.pptx
Appium.pptxAppium.pptx
Appium.pptx
 
[Srijan Wednesday Webinar] Mastering Mobile Test Automation with Appium
[Srijan Wednesday Webinar] Mastering Mobile Test Automation with Appium[Srijan Wednesday Webinar] Mastering Mobile Test Automation with Appium
[Srijan Wednesday Webinar] Mastering Mobile Test Automation with Appium
 
Appium_set_up
Appium_set_upAppium_set_up
Appium_set_up
 
Appium Mobile Testing - Nakov at js.talks() Conference - Nov 2021
Appium Mobile Testing - Nakov at js.talks() Conference - Nov 2021Appium Mobile Testing - Nakov at js.talks() Conference - Nov 2021
Appium Mobile Testing - Nakov at js.talks() Conference - Nov 2021
 
Automation using Appium
Automation using AppiumAutomation using Appium
Automation using Appium
 

Recently uploaded

GraphSummit Paris - The art of the possible with Graph Technology
GraphSummit Paris - The art of the possible with Graph TechnologyGraphSummit Paris - The art of the possible with Graph Technology
GraphSummit Paris - The art of the possible with Graph Technology
Neo4j
 
Enhancing Research Orchestration Capabilities at ORNL.pdf
Enhancing Research Orchestration Capabilities at ORNL.pdfEnhancing Research Orchestration Capabilities at ORNL.pdf
Enhancing Research Orchestration Capabilities at ORNL.pdf
Globus
 
Quarkus Hidden and Forbidden Extensions
Quarkus Hidden and Forbidden ExtensionsQuarkus Hidden and Forbidden Extensions
Quarkus Hidden and Forbidden Extensions
Max Andersen
 
Top Features to Include in Your Winzo Clone App for Business Growth (4).pptx
Top Features to Include in Your Winzo Clone App for Business Growth (4).pptxTop Features to Include in Your Winzo Clone App for Business Growth (4).pptx
Top Features to Include in Your Winzo Clone App for Business Growth (4).pptx
rickgrimesss22
 
Gamify Your Mind; The Secret Sauce to Delivering Success, Continuously Improv...
Gamify Your Mind; The Secret Sauce to Delivering Success, Continuously Improv...Gamify Your Mind; The Secret Sauce to Delivering Success, Continuously Improv...
Gamify Your Mind; The Secret Sauce to Delivering Success, Continuously Improv...
Shahin Sheidaei
 
Text-Summarization-of-Breaking-News-Using-Fine-tuning-BART-Model.pptx
Text-Summarization-of-Breaking-News-Using-Fine-tuning-BART-Model.pptxText-Summarization-of-Breaking-News-Using-Fine-tuning-BART-Model.pptx
Text-Summarization-of-Breaking-News-Using-Fine-tuning-BART-Model.pptx
ShamsuddeenMuhammadA
 
Innovating Inference - Remote Triggering of Large Language Models on HPC Clus...
Innovating Inference - Remote Triggering of Large Language Models on HPC Clus...Innovating Inference - Remote Triggering of Large Language Models on HPC Clus...
Innovating Inference - Remote Triggering of Large Language Models on HPC Clus...
Globus
 
Globus Connect Server Deep Dive - GlobusWorld 2024
Globus Connect Server Deep Dive - GlobusWorld 2024Globus Connect Server Deep Dive - GlobusWorld 2024
Globus Connect Server Deep Dive - GlobusWorld 2024
Globus
 
Developing Distributed High-performance Computing Capabilities of an Open Sci...
Developing Distributed High-performance Computing Capabilities of an Open Sci...Developing Distributed High-performance Computing Capabilities of an Open Sci...
Developing Distributed High-performance Computing Capabilities of an Open Sci...
Globus
 
Graphic Design Crash Course for beginners
Graphic Design Crash Course for beginnersGraphic Design Crash Course for beginners
Graphic Design Crash Course for beginners
e20449
 
How to Position Your Globus Data Portal for Success Ten Good Practices
How to Position Your Globus Data Portal for Success Ten Good PracticesHow to Position Your Globus Data Portal for Success Ten Good Practices
How to Position Your Globus Data Portal for Success Ten Good Practices
Globus
 
Webinar: Salesforce Document Management 2.0 - Smarter, Faster, Better
Webinar: Salesforce Document Management 2.0 - Smarter, Faster, BetterWebinar: Salesforce Document Management 2.0 - Smarter, Faster, Better
Webinar: Salesforce Document Management 2.0 - Smarter, Faster, Better
XfilesPro
 
GlobusWorld 2024 Opening Keynote session
GlobusWorld 2024 Opening Keynote sessionGlobusWorld 2024 Opening Keynote session
GlobusWorld 2024 Opening Keynote session
Globus
 
Custom Healthcare Software for Managing Chronic Conditions and Remote Patient...
Custom Healthcare Software for Managing Chronic Conditions and Remote Patient...Custom Healthcare Software for Managing Chronic Conditions and Remote Patient...
Custom Healthcare Software for Managing Chronic Conditions and Remote Patient...
Mind IT Systems
 
Vitthal Shirke Java Microservices Resume.pdf
Vitthal Shirke Java Microservices Resume.pdfVitthal Shirke Java Microservices Resume.pdf
Vitthal Shirke Java Microservices Resume.pdf
Vitthal Shirke
 
Prosigns: Transforming Business with Tailored Technology Solutions
Prosigns: Transforming Business with Tailored Technology SolutionsProsigns: Transforming Business with Tailored Technology Solutions
Prosigns: Transforming Business with Tailored Technology Solutions
Prosigns
 
Introduction to Pygame (Lecture 7 Python Game Development)
Introduction to Pygame (Lecture 7 Python Game Development)Introduction to Pygame (Lecture 7 Python Game Development)
Introduction to Pygame (Lecture 7 Python Game Development)
abdulrafaychaudhry
 
AI Pilot Review: The World’s First Virtual Assistant Marketing Suite
AI Pilot Review: The World’s First Virtual Assistant Marketing SuiteAI Pilot Review: The World’s First Virtual Assistant Marketing Suite
AI Pilot Review: The World’s First Virtual Assistant Marketing Suite
Google
 
Enterprise Resource Planning System in Telangana
Enterprise Resource Planning System in TelanganaEnterprise Resource Planning System in Telangana
Enterprise Resource Planning System in Telangana
NYGGS Automation Suite
 
Orion Context Broker introduction 20240604
Orion Context Broker introduction 20240604Orion Context Broker introduction 20240604
Orion Context Broker introduction 20240604
Fermin Galan
 

Recently uploaded (20)

GraphSummit Paris - The art of the possible with Graph Technology
GraphSummit Paris - The art of the possible with Graph TechnologyGraphSummit Paris - The art of the possible with Graph Technology
GraphSummit Paris - The art of the possible with Graph Technology
 
Enhancing Research Orchestration Capabilities at ORNL.pdf
Enhancing Research Orchestration Capabilities at ORNL.pdfEnhancing Research Orchestration Capabilities at ORNL.pdf
Enhancing Research Orchestration Capabilities at ORNL.pdf
 
Quarkus Hidden and Forbidden Extensions
Quarkus Hidden and Forbidden ExtensionsQuarkus Hidden and Forbidden Extensions
Quarkus Hidden and Forbidden Extensions
 
Top Features to Include in Your Winzo Clone App for Business Growth (4).pptx
Top Features to Include in Your Winzo Clone App for Business Growth (4).pptxTop Features to Include in Your Winzo Clone App for Business Growth (4).pptx
Top Features to Include in Your Winzo Clone App for Business Growth (4).pptx
 
Gamify Your Mind; The Secret Sauce to Delivering Success, Continuously Improv...
Gamify Your Mind; The Secret Sauce to Delivering Success, Continuously Improv...Gamify Your Mind; The Secret Sauce to Delivering Success, Continuously Improv...
Gamify Your Mind; The Secret Sauce to Delivering Success, Continuously Improv...
 
Text-Summarization-of-Breaking-News-Using-Fine-tuning-BART-Model.pptx
Text-Summarization-of-Breaking-News-Using-Fine-tuning-BART-Model.pptxText-Summarization-of-Breaking-News-Using-Fine-tuning-BART-Model.pptx
Text-Summarization-of-Breaking-News-Using-Fine-tuning-BART-Model.pptx
 
Innovating Inference - Remote Triggering of Large Language Models on HPC Clus...
Innovating Inference - Remote Triggering of Large Language Models on HPC Clus...Innovating Inference - Remote Triggering of Large Language Models on HPC Clus...
Innovating Inference - Remote Triggering of Large Language Models on HPC Clus...
 
Globus Connect Server Deep Dive - GlobusWorld 2024
Globus Connect Server Deep Dive - GlobusWorld 2024Globus Connect Server Deep Dive - GlobusWorld 2024
Globus Connect Server Deep Dive - GlobusWorld 2024
 
Developing Distributed High-performance Computing Capabilities of an Open Sci...
Developing Distributed High-performance Computing Capabilities of an Open Sci...Developing Distributed High-performance Computing Capabilities of an Open Sci...
Developing Distributed High-performance Computing Capabilities of an Open Sci...
 
Graphic Design Crash Course for beginners
Graphic Design Crash Course for beginnersGraphic Design Crash Course for beginners
Graphic Design Crash Course for beginners
 
How to Position Your Globus Data Portal for Success Ten Good Practices
How to Position Your Globus Data Portal for Success Ten Good PracticesHow to Position Your Globus Data Portal for Success Ten Good Practices
How to Position Your Globus Data Portal for Success Ten Good Practices
 
Webinar: Salesforce Document Management 2.0 - Smarter, Faster, Better
Webinar: Salesforce Document Management 2.0 - Smarter, Faster, BetterWebinar: Salesforce Document Management 2.0 - Smarter, Faster, Better
Webinar: Salesforce Document Management 2.0 - Smarter, Faster, Better
 
GlobusWorld 2024 Opening Keynote session
GlobusWorld 2024 Opening Keynote sessionGlobusWorld 2024 Opening Keynote session
GlobusWorld 2024 Opening Keynote session
 
Custom Healthcare Software for Managing Chronic Conditions and Remote Patient...
Custom Healthcare Software for Managing Chronic Conditions and Remote Patient...Custom Healthcare Software for Managing Chronic Conditions and Remote Patient...
Custom Healthcare Software for Managing Chronic Conditions and Remote Patient...
 
Vitthal Shirke Java Microservices Resume.pdf
Vitthal Shirke Java Microservices Resume.pdfVitthal Shirke Java Microservices Resume.pdf
Vitthal Shirke Java Microservices Resume.pdf
 
Prosigns: Transforming Business with Tailored Technology Solutions
Prosigns: Transforming Business with Tailored Technology SolutionsProsigns: Transforming Business with Tailored Technology Solutions
Prosigns: Transforming Business with Tailored Technology Solutions
 
Introduction to Pygame (Lecture 7 Python Game Development)
Introduction to Pygame (Lecture 7 Python Game Development)Introduction to Pygame (Lecture 7 Python Game Development)
Introduction to Pygame (Lecture 7 Python Game Development)
 
AI Pilot Review: The World’s First Virtual Assistant Marketing Suite
AI Pilot Review: The World’s First Virtual Assistant Marketing SuiteAI Pilot Review: The World’s First Virtual Assistant Marketing Suite
AI Pilot Review: The World’s First Virtual Assistant Marketing Suite
 
Enterprise Resource Planning System in Telangana
Enterprise Resource Planning System in TelanganaEnterprise Resource Planning System in Telangana
Enterprise Resource Planning System in Telangana
 
Orion Context Broker introduction 20240604
Orion Context Broker introduction 20240604Orion Context Broker introduction 20240604
Orion Context Broker introduction 20240604
 

Appuim 101

  • 1. Mobile testing Automation using Appium for Android Aliaa Monier Eclipse IDE for Java SeleniumWebDriver
  • 2. Agenda • What is Appium? • Appium Architecture • How Appium works in Android? • Installation Summary. • Turn On USB Debugging on Android Device. • Find appPackage and appActivity name of Android app. • UIAutomatorViewer 101. • First AppiumTest Script ~ Demo. • AppiumTest Script usingTestNG ~ Demo • References.
  • 3. What is Appium? • Appium is an open source test automation tool developed and supported by Sauce Labs to automate native and hybrid mobile apps. • It is basically known as a Cross-Platform Mobile Automation Tool. • It uses JSONWire Protocol internally to interact with iOS and Android native apps using the SeleniumWebDriver.
  • 4. Appium Architecture • Appium is a HTTP server written in node.js which creates and handles multiple WebDriver sessions for different platforms like iOS and Android. • Appium starts a “test case” on the device that hosts a server and listens for proxies commands from the main Appium server. • Appium perceives HTTP requests from selenium client libraries and it handles those requests in different ways depending upon the platforms.
  • 5. How Appium works in Android? Bootstrap.jar UIAutomator Command Server TCP Server Webdriver Script driver.findElement(By.id("sear ch_box_idle_text")).setValue(" Google"); WebDrivercontroller UIAutomator Controller (Android) UIAutomator Command Client TCP Client
  • 6. Installation Summary JAVA • Download and Install Java JDK. • Setup Java Environment Variables. Android • Download and Install Android Studio. • Install additional Android SDK tools (adb , UIAutomatorViewer…) • Setup Android Environment Variables. NodeJs • Download and Install NodeJs. Appium • Download and Install Appium Desktop Client. • Download Appium Jars for Eclipse ( SeleniumWebDriver Jars & Appium Java Client Jar ) Eclipse • Download and Install Eclipse IDE for Java. • Create Eclipse project and add Appium JAR files to your Project. TestNG • Install TestNG Eclipse plugin.
  • 7. Turn On USB Debugging on Android Device Enabling USB Debugging on your android device is a two step process: • First, get the Developer options on your phone • Then, use Developer options to enable USB Debugging
  • 8. Turn On USB Debugging on Android Device
  • 9. Find appPackage and appActivity name of Android app 1 - Unlock your mobile device and connect it to your computer using USB cable. 2 - Open Command Prompt and run the command : adb devices We are running this command to just make sure that your mobile is properly connected. 3 - Run ‘adb shell’ command. 4 - Now in your mobile phone, open the app for which you want to find the appPackage and appActivity. 5 - Now run this command: dumpsys window windows | grep -E ‘mCurrentFocus’
  • 10. UIAutomatorViewer 101 1 - Uniquely identify the element in mobile application: • Open command prompt • Type uiautomatorviewer and then hit Enter • Wait for a couple of seconds , UIAutomatorViewer window would open as shown.
  • 11. UIAutomatorViewer 101 2 - Perform action on the identified element. • Make sure that your mobile phone is connected properly with USB. Also, ensure that it is unlocked and your app is opened • Now click on Device Screenshot icon in UIAutomatorViewer.
  • 13. UIAutomatorViewer 101 Different ways to identify elements using Appium: • Find element by ID • Find element by ClassName • Find element byTag Name • Find element by Accessibility ID • Find element by XPath
  • 14. Demo
  • 15. First AppiumTest Script • Start Appium Server • Get your Mobile Phone’s Device ID • Get your Mobile Phone’s Android version • Find out appPackage and appActivity names of the mobile app • Write AppiumTest Script • Run AppiumTest Script