SlideShare a Scribd company logo
1 of 38
Selendroid in Action
Dominik Dary
Hamburg Mobile Quality Crew
2015-10-21
Who am I?
Dominik Dary
Engineering Manager @
Twitter: @dominikdary
Github: http://github.com/dominikdary
Disclaimer: My Opinions are my own.
Selendroid in Action
Agenda
• Short Introdution
• After covering the basics about how to find and interact with UI
elements,
• we will look into techniques of writing maintainable tests.
• In the end we will run our tests in parallel using the Selenium Grid.
Selendroid in Action
SHORT INTRODUCTION
Selendroid in Action
W3C WebDriver Spec
Selendroid in Action
JSON WIRE
PROTOCOLClient
Java
C#
Ruby
Python
i.e. FirefoxDriver, selendroid,
ios-driver
Server
https://dvcs.w3.org/hg/webdriver/raw-file/tip/webdriver-spec.html
Selendroid - Supported Methods
ONE PROTOCOL TO RULE THEM ALL
Selendroid in Action
Source:
http://en.wikipedia.org/wiki/File:Unico_Anello.png#file
Selendroid
Open sourced on github:
– https://github.com/selendroid
Documentation:
• https://selendroid.io
Committers:
– eBay, PayPal, Salesforce, Facebook,
Red Hat and many others
Getting help
– IRC : #selendroid on freenode
Selendroid in Action
Features
– The only mobile WebDriver that supports native & hybrid apps
and testing the mobile web on Android versions (API 10 to 23)
– Full compatibility with the JSON Wire Protocol.
– The app under test must not be modified
– No jailbreak / rooting of devices
– Interacts simultaneously with multiple Android devices
– Supports hot plugging of hardware devices
– Advanced Gestures are supported
Selendroid in Action
Testing In Action
Mobile WebHybridNative
Selendroid in Action
Native Element Selectors
• Id
Finds the element by Id.
• name
Finds the element by content description (accessibility label).
• link text
Finds the element by displayed text.
• partial link text
Finds the element by partial displayed text.
• class
Finds the element by full class name (e.g. android.widget.Button).
• tag name
Finds the element by tag name e.g. button
• xpath
Finds the element by a xpath expression.
Selendroid in Action
Selendroid Inspector
• View hierarchy
• View UI element properties
• UI screenshot with view
locator
• Record the click actions
• View HTML of a web view
• XPath helper
Selendroid in Action
Demo: http://youtu.be/JKZeF3eHljo
FIRST HANDS ON SESSION
Selendroid in Action
First Practical Demo
• Clone the project:
• Open Class:
git clone https://github.com/DominikDary/selendroid-workshop.git
FirstSelendroidTest
Selendroid in Action
FirstSelendroidTest
• Make sure you have defined an emulator (and started) or
connected a hardware device.
• Excuting „adb devices“ lists your device
• The test automatically starts and stops selendroid
Add a breakpoint
Selendroid in Action
Get Your Hands Dirty
• Write a Test
– that navigate to the User Registration Screen
– Use the Inspector to find the Element details
– Use these locators
• Id, name, xpath, link text
• Goal is to fill out the registration form and
• To validate on the following Dialog that the right input
Hints:
• Debug the test and use the Selendroid Inspector
(http://localhost:4444/inspector/ )
• Docu is located here: http://selendroid.io/native.html
• Do not over engineer, just write all the stepsSelendroid in Action
Selendroid Repl
• Interactive Command execution
• Results are immediately displayed
• The app can be manually used to navigate to the dialog you
want to automate.
• Interested? Read more:
selendroid-workshop/docs/selendroid-python-repl.md
Selendroid in Action
MAINTAINABILITY IS KING
Selendroid in Action
Pages and Flows
e-Commerce shopping site
Checkout Page Success Page
Shopping Cart
PageItem Page
View
Orderlist
View
Category
Update
Delete
View
Product
Search
Item
View
Category
Review
Select
Payment
Provider
Order
Summary
Selendroid in Action
In Our Example
Selendroid in Action
ANDROID APP TEST CASE
Selendroid in Action
Tests
Flow
Objects
Page
Objects
SECOND HANDS ON SESSION
Selendroid in Action
Use Pages and Flows
• If you have not finished the first session, checkout the branch
• Please create a Page Object class for every screen
• Please create a flow class that delegates to the different pages
• Change your test in order to use the flow and page objetcs
• Run your tests
git checkout resultFirstSession
Selendroid in Action
Second Result
• If you have not finished the first session, checkout the branch
git checkout resultSecondSession
Selendroid in Action
TEST INFRASTRUCTURE
Selendroid in Action
THE IMPORTANCE OF PARALLEL
TEST EXECUTION
• Multiple Apps
• Multiple Locales
• iOS Devices
– iPhone vs. iPad
– Version
• Android Devices
– Manufactures
– Screen Sizes
– OS Modifications
Selendroid in Action
Picture Source: http://www.flickr.com/photos/ippei-janine/483345027/
Scaling using the Selenium Grid
Selendroid in Action
Client
serverGRID HubClient
CI
server
server
THIRD HANDS ON SESSION
Selendroid in Action
Startup a Grid
• Start selenium grid
• Start Selendroid and Register to Grid
http://selendroid.io/scale.html
java -jar selendroid-standalone-0.16.0-SNAPSHOT-with-dependencies.jar -app
selendroid-test-app-0.16.0-SNAPSHOT.apk -port 5555 -hub
http://127.0.0.1:4444/grid/register -proxy io.selendroid.grid.SelendroidSessionProxy
-host 127.0.0.1
java -Dfile.encoding=UTF-8 -cp "selendroid-grid-plugin-0.16.0-
SNAPSHOT.jar:selenium-server-standalone-2.45.0.jar"
org.openqa.grid.selenium.GridLauncher -capabilityMatcher
io.selendroid.grid.SelendroidCapabilityMatcher -role hub -host 127.0.0.1 -port 4444
Selendroid in Action
In Action
• After you have started the grid
– Check if everything is fine:
– Grid: http://127.0.0.1:4444/grid/console
– Selendroid Standalone: http://127.0.0.1:5555/wd/hub/status
• Open any previous test
– Deactive Code that starts selendroid
– Run your test
Selendroid in Action
FUTURE
Selendroid in Action
Future
• Adding uiautomator2 support
• Release Selendroid 1.0
Selendroid in Action
We are looking for contributors and
Image Source: https://c2.staticflickr.com/8/7350/9665734904_38a85f1be5_b.jpg
Selendroid in Action
Thank You!
Questions or Comments?
Selendroid in Action
Contact & Getting help
IRC : #selendroid on freenode
Mailing List:
http://groups.google.com/group/selendroid
Selendroid in Action
Videos: Selendroid in Action
– Native Demo: http://youtu.be/074BnGV0mS0
– Hybrid Demo: http://youtu.be/FGsKI6esKpw
– Mobile Web Demo: http://goo.gl/41uvAx
– Selendroid Article:
http://www.methodsandtools.com/tools/selendroid.php
Selendroid in Action
BACKUP
Selendroid in Action
Multi Touch Support
• Single finger example:
TouchAction ta = new TouchActionBuilder().pointerDown().
pointerMove(x, y).pointerUp().build();
driver.getMultiTouchScreen().executeAction(ta);
• Multi finger example (these will be executed in parallel):
TouchAction finger1 = new TouchActionBuilder().pointerDown().pause(100).
pointerMove(x, y).pointerUp().build();
TouchAction finger2 = new TouchActionBuilder().pointerDown().pause(100).
pointerMove(x, y).pointerUp().build(); MultiTouchAction multiAction = new
MultiTouchAction(finger1, finger2);
driver.getMultiTouchScreen().executeAction(multiAction);
Selendroid in Action
Touch Gestures Session
• Start Selendroid Test App
• Press „Touch Actions“ Button
• This Activity can be used to
– try Touch Gestures
– Identified gestures will be displayed
Selendroid in Action

More Related Content

What's hot

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 Introductionsnevesbarros
 
Nakal think test_2015
Nakal think test_2015Nakal think test_2015
Nakal think test_2015Rajdeep Varma
 
Ios driver presentation copy
Ios driver presentation copyIos driver presentation copy
Ios driver presentation copyDavid O'Dowd
 
Different Android Test Automation Frameworks - What Works You the Best?
Different Android Test Automation Frameworks - What Works You the Best?Different Android Test Automation Frameworks - What Works You the Best?
Different Android Test Automation Frameworks - What Works You the Best?Bitbar
 
Cross Platform Appium Tests: How To
Cross Platform Appium Tests: How ToCross Platform Appium Tests: How To
Cross Platform Appium Tests: How ToGlobalLogic Ukraine
 
Selenium Testing on Chrome - Google DevFest Armenia 2015
Selenium Testing on Chrome - Google DevFest Armenia 2015Selenium Testing on Chrome - Google DevFest Armenia 2015
Selenium Testing on Chrome - Google DevFest Armenia 2015Sargis Sargsyan
 
Getting started with appium
Getting started with appiumGetting started with appium
Getting started with appiumPratik Patel
 
Selenium IDE Tutorial For Beginners | Selenium IDE Tutorial | What Is Seleniu...
Selenium IDE Tutorial For Beginners | Selenium IDE Tutorial | What Is Seleniu...Selenium IDE Tutorial For Beginners | Selenium IDE Tutorial | What Is Seleniu...
Selenium IDE Tutorial For Beginners | Selenium IDE Tutorial | What Is Seleniu...Simplilearn
 
How we Test at eBay Europe
How we Test at eBay EuropeHow we Test at eBay Europe
How we Test at eBay EuropeMichael Palotas
 
Hassle-Free Continuous Integration with Real Device Testing
Hassle-Free Continuous Integration with Real Device TestingHassle-Free Continuous Integration with Real Device Testing
Hassle-Free Continuous Integration with Real Device TestingBitbar
 
Android & iOS Automation Using Appium
Android & iOS Automation Using AppiumAndroid & iOS Automation Using Appium
Android & iOS Automation Using AppiumMindfire Solutions
 
Selenium WebDriver Tutorial | Selenium WebDriver Tutorial For Beginner | Sele...
Selenium WebDriver Tutorial | Selenium WebDriver Tutorial For Beginner | Sele...Selenium WebDriver Tutorial | Selenium WebDriver Tutorial For Beginner | Sele...
Selenium WebDriver Tutorial | Selenium WebDriver Tutorial For Beginner | Sele...Simplilearn
 
Testing Native iOS Apps with Appium
Testing Native iOS Apps with AppiumTesting Native iOS Apps with Appium
Testing Native iOS Apps with AppiumSauce Labs
 
[Srijan Wednesday Webinars] Building a High Performance QA Team
[Srijan Wednesday Webinars] Building a High Performance QA Team[Srijan Wednesday Webinars] Building a High Performance QA Team
[Srijan Wednesday Webinars] Building a High Performance QA TeamSrijan Technologies
 
Automated Testing and Continuous Deployment for Mobile Apps with Jenkins
Automated Testing and Continuous Deployment for Mobile Apps with Jenkins Automated Testing and Continuous Deployment for Mobile Apps with Jenkins
Automated Testing and Continuous Deployment for Mobile Apps with Jenkins CloudBees
 
Mobile Automation with Appium
Mobile Automation with AppiumMobile Automation with Appium
Mobile Automation with AppiumManoj Kumar Kumar
 

What's hot (20)

Appium
AppiumAppium
Appium
 
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
 
Nakal think test_2015
Nakal think test_2015Nakal think test_2015
Nakal think test_2015
 
Ios driver presentation copy
Ios driver presentation copyIos driver presentation copy
Ios driver presentation copy
 
Different Android Test Automation Frameworks - What Works You the Best?
Different Android Test Automation Frameworks - What Works You the Best?Different Android Test Automation Frameworks - What Works You the Best?
Different Android Test Automation Frameworks - What Works You the Best?
 
Cross Platform Appium Tests: How To
Cross Platform Appium Tests: How ToCross Platform Appium Tests: How To
Cross Platform Appium Tests: How To
 
Selenium Testing on Chrome - Google DevFest Armenia 2015
Selenium Testing on Chrome - Google DevFest Armenia 2015Selenium Testing on Chrome - Google DevFest Armenia 2015
Selenium Testing on Chrome - Google DevFest Armenia 2015
 
Getting started with appium
Getting started with appiumGetting started with appium
Getting started with appium
 
Selenium IDE Tutorial For Beginners | Selenium IDE Tutorial | What Is Seleniu...
Selenium IDE Tutorial For Beginners | Selenium IDE Tutorial | What Is Seleniu...Selenium IDE Tutorial For Beginners | Selenium IDE Tutorial | What Is Seleniu...
Selenium IDE Tutorial For Beginners | Selenium IDE Tutorial | What Is Seleniu...
 
How we Test at eBay Europe
How we Test at eBay EuropeHow we Test at eBay Europe
How we Test at eBay Europe
 
Hassle-Free Continuous Integration with Real Device Testing
Hassle-Free Continuous Integration with Real Device TestingHassle-Free Continuous Integration with Real Device Testing
Hassle-Free Continuous Integration with Real Device Testing
 
Appium & Jenkins
Appium & JenkinsAppium & Jenkins
Appium & Jenkins
 
Android & iOS Automation Using Appium
Android & iOS Automation Using AppiumAndroid & iOS Automation Using Appium
Android & iOS Automation Using Appium
 
Selenium WebDriver Tutorial | Selenium WebDriver Tutorial For Beginner | Sele...
Selenium WebDriver Tutorial | Selenium WebDriver Tutorial For Beginner | Sele...Selenium WebDriver Tutorial | Selenium WebDriver Tutorial For Beginner | Sele...
Selenium WebDriver Tutorial | Selenium WebDriver Tutorial For Beginner | Sele...
 
Testing Native iOS Apps with Appium
Testing Native iOS Apps with AppiumTesting Native iOS Apps with Appium
Testing Native iOS Apps with Appium
 
[Srijan Wednesday Webinars] Building a High Performance QA Team
[Srijan Wednesday Webinars] Building a High Performance QA Team[Srijan Wednesday Webinars] Building a High Performance QA Team
[Srijan Wednesday Webinars] Building a High Performance QA Team
 
Automated Testing and Continuous Deployment for Mobile Apps with Jenkins
Automated Testing and Continuous Deployment for Mobile Apps with Jenkins Automated Testing and Continuous Deployment for Mobile Apps with Jenkins
Automated Testing and Continuous Deployment for Mobile Apps with Jenkins
 
Mobile Automation with Appium
Mobile Automation with AppiumMobile Automation with Appium
Mobile Automation with Appium
 
Automated UI Testing Frameworks
Automated UI Testing FrameworksAutomated UI Testing Frameworks
Automated UI Testing Frameworks
 
Selenium for Jobseekers
Selenium for JobseekersSelenium for Jobseekers
Selenium for Jobseekers
 

Viewers also liked

InfoCamp 12 Keynote - Innovation in the fast lane with Open Source Tools
InfoCamp 12 Keynote - Innovation in the fast lane with Open Source ToolsInfoCamp 12 Keynote - Innovation in the fast lane with Open Source Tools
InfoCamp 12 Keynote - Innovation in the fast lane with Open Source ToolsDominik Dary
 
Startup'tan E-ticaret Devi Olmak: SEO Altyapısını Oluştururken Google'ı Doğru...
Startup'tan E-ticaret Devi Olmak: SEO Altyapısını Oluştururken Google'ı Doğru...Startup'tan E-ticaret Devi Olmak: SEO Altyapısını Oluştururken Google'ı Doğru...
Startup'tan E-ticaret Devi Olmak: SEO Altyapısını Oluştururken Google'ı Doğru...Uğur Eskici
 
Rulesimple Hizmetlerimiz
Rulesimple HizmetlerimizRulesimple Hizmetlerimiz
Rulesimple HizmetlerimizCan Taner
 
Syllabus ref02
Syllabus ref02Syllabus ref02
Syllabus ref02SongTu
 
2013 Scrum Gathering Keynote: Buy or build — where did your agile come from?
2013 Scrum Gathering Keynote: Buy or build — where did your agile come from?2013 Scrum Gathering Keynote: Buy or build — where did your agile come from?
2013 Scrum Gathering Keynote: Buy or build — where did your agile come from?James Coplien
 
Cooking an ontology-based spoken dialogue system
Cooking an ontology-based spoken dialogue systemCooking an ontology-based spoken dialogue system
Cooking an ontology-based spoken dialogue systemJoana Paulo Pardal
 
IEEE Day 2013 Oracle Database 12c: new features for developers
IEEE Day 2013 Oracle Database 12c: new features for developersIEEE Day 2013 Oracle Database 12c: new features for developers
IEEE Day 2013 Oracle Database 12c: new features for developersRamin Orujov
 
The importance of internet usage as a marketing tool in the studies of sports...
The importance of internet usage as a marketing tool in the studies of sports...The importance of internet usage as a marketing tool in the studies of sports...
The importance of internet usage as a marketing tool in the studies of sports...Merve Aydogan
 
Great Pyramid of Giza and Golden Section Transform Preview
Great Pyramid of Giza and Golden Section Transform PreviewGreat Pyramid of Giza and Golden Section Transform Preview
Great Pyramid of Giza and Golden Section Transform PreviewJason Li
 
Webrazzi online code: iyzico continuous delivery
Webrazzi online code: iyzico continuous deliveryWebrazzi online code: iyzico continuous delivery
Webrazzi online code: iyzico continuous deliveryHakan ERDOGAN
 
Important Skills Every Entrepreneur Should Have
Important Skills Every Entrepreneur Should HaveImportant Skills Every Entrepreneur Should Have
Important Skills Every Entrepreneur Should HaveInshan Meahjohn
 

Viewers also liked (16)

InfoCamp 12 Keynote - Innovation in the fast lane with Open Source Tools
InfoCamp 12 Keynote - Innovation in the fast lane with Open Source ToolsInfoCamp 12 Keynote - Innovation in the fast lane with Open Source Tools
InfoCamp 12 Keynote - Innovation in the fast lane with Open Source Tools
 
Introduction
IntroductionIntroduction
Introduction
 
Startup'tan E-ticaret Devi Olmak: SEO Altyapısını Oluştururken Google'ı Doğru...
Startup'tan E-ticaret Devi Olmak: SEO Altyapısını Oluştururken Google'ı Doğru...Startup'tan E-ticaret Devi Olmak: SEO Altyapısını Oluştururken Google'ı Doğru...
Startup'tan E-ticaret Devi Olmak: SEO Altyapısını Oluştururken Google'ı Doğru...
 
Rulesimple Hizmetlerimiz
Rulesimple HizmetlerimizRulesimple Hizmetlerimiz
Rulesimple Hizmetlerimiz
 
Test Driven Development
Test Driven DevelopmentTest Driven Development
Test Driven Development
 
Syllabus ref02
Syllabus ref02Syllabus ref02
Syllabus ref02
 
Kullanıcı Deneyimi & Kullanılabilirlik
Kullanıcı Deneyimi & KullanılabilirlikKullanıcı Deneyimi & Kullanılabilirlik
Kullanıcı Deneyimi & Kullanılabilirlik
 
Pruebas exploratorias
Pruebas exploratoriasPruebas exploratorias
Pruebas exploratorias
 
2013 Scrum Gathering Keynote: Buy or build — where did your agile come from?
2013 Scrum Gathering Keynote: Buy or build — where did your agile come from?2013 Scrum Gathering Keynote: Buy or build — where did your agile come from?
2013 Scrum Gathering Keynote: Buy or build — where did your agile come from?
 
Cooking an ontology-based spoken dialogue system
Cooking an ontology-based spoken dialogue systemCooking an ontology-based spoken dialogue system
Cooking an ontology-based spoken dialogue system
 
IEEE Day 2013 Oracle Database 12c: new features for developers
IEEE Day 2013 Oracle Database 12c: new features for developersIEEE Day 2013 Oracle Database 12c: new features for developers
IEEE Day 2013 Oracle Database 12c: new features for developers
 
The importance of internet usage as a marketing tool in the studies of sports...
The importance of internet usage as a marketing tool in the studies of sports...The importance of internet usage as a marketing tool in the studies of sports...
The importance of internet usage as a marketing tool in the studies of sports...
 
Great Pyramid of Giza and Golden Section Transform Preview
Great Pyramid of Giza and Golden Section Transform PreviewGreat Pyramid of Giza and Golden Section Transform Preview
Great Pyramid of Giza and Golden Section Transform Preview
 
Webrazzi online code: iyzico continuous delivery
Webrazzi online code: iyzico continuous deliveryWebrazzi online code: iyzico continuous delivery
Webrazzi online code: iyzico continuous delivery
 
Important Skills Every Entrepreneur Should Have
Important Skills Every Entrepreneur Should HaveImportant Skills Every Entrepreneur Should Have
Important Skills Every Entrepreneur Should Have
 
Will power
Will powerWill power
Will power
 

Similar to Selendroid in Action

OpenTuesday: Die Selenium-Toolfamilie und ihr Einsatz im Web- und Mobile-Auto...
OpenTuesday: Die Selenium-Toolfamilie und ihr Einsatz im Web- und Mobile-Auto...OpenTuesday: Die Selenium-Toolfamilie und ihr Einsatz im Web- und Mobile-Auto...
OpenTuesday: Die Selenium-Toolfamilie und ihr Einsatz im Web- und Mobile-Auto...Digicomp Academy AG
 
Mobile Test Automation using one API and one infrastructure
Mobile Test Automation using one API and one infrastructureMobile Test Automation using one API and one infrastructure
Mobile Test Automation using one API and one infrastructureMichael Palotas
 
selenium-2-mobile-web-testing
selenium-2-mobile-web-testingselenium-2-mobile-web-testing
selenium-2-mobile-web-testinghugs
 
Selenium- A Software Testing Tool
Selenium- A Software Testing ToolSelenium- A Software Testing Tool
Selenium- A Software Testing ToolZeba Tahseen
 
Mastering Test Automation: How to Use Selenium Successfully
Mastering Test Automation: How to Use Selenium Successfully Mastering Test Automation: How to Use Selenium Successfully
Mastering Test Automation: How to Use Selenium Successfully Applitools
 
Testing on Android
Testing on AndroidTesting on Android
Testing on AndroidAri Lacenski
 
Mobile Testing with Selenium 2 by Jason Huggins
Mobile Testing with Selenium 2 by Jason HugginsMobile Testing with Selenium 2 by Jason Huggins
Mobile Testing with Selenium 2 by Jason HugginsSauce Labs
 
Pdx Se Intro To Se
Pdx Se Intro To SePdx Se Intro To Se
Pdx Se Intro To SeAn Doan
 
#Code2Create:: Introduction to App Development in Flutter with Dart
#Code2Create:: Introduction to App Development in Flutter with Dart#Code2Create:: Introduction to App Development in Flutter with Dart
#Code2Create:: Introduction to App Development in Flutter with DartGDGKuwaitGoogleDevel
 
Behavior Driven Development by Example
Behavior Driven Development by ExampleBehavior Driven Development by Example
Behavior Driven Development by ExampleNalin Goonawardana
 
Continuous Delivery, Continuous Integration
Continuous Delivery, Continuous Integration Continuous Delivery, Continuous Integration
Continuous Delivery, Continuous Integration Amazon Web Services
 
Selenium Tips & Tricks, presented at the Tel Aviv Selenium Meetup
Selenium Tips & Tricks, presented at the Tel Aviv Selenium MeetupSelenium Tips & Tricks, presented at the Tel Aviv Selenium Meetup
Selenium Tips & Tricks, presented at the Tel Aviv Selenium MeetupDave Haeffner
 
Selenium Introduction and IDE
Selenium Introduction and IDESelenium Introduction and IDE
Selenium Introduction and IDEMurageppa-QA
 
Native Android Development with Spring
Native Android Development with SpringNative Android Development with Spring
Native Android Development with SpringRoy Clarkson
 
Vietnam qa meetup
Vietnam qa meetupVietnam qa meetup
Vietnam qa meetupSyam Sasi
 
Phonegap Development & Debugging
Phonegap Development & DebuggingPhonegap Development & Debugging
Phonegap Development & DebuggingIvano Malavolta
 
How to use selenium successfully
How to use selenium successfullyHow to use selenium successfully
How to use selenium successfullyTEST Huddle
 
SF Gradle Meetup - Netflix OSS
SF Gradle Meetup - Netflix OSSSF Gradle Meetup - Netflix OSS
SF Gradle Meetup - Netflix OSSJustin Ryan
 

Similar to Selendroid in Action (20)

OpenTuesday: Die Selenium-Toolfamilie und ihr Einsatz im Web- und Mobile-Auto...
OpenTuesday: Die Selenium-Toolfamilie und ihr Einsatz im Web- und Mobile-Auto...OpenTuesday: Die Selenium-Toolfamilie und ihr Einsatz im Web- und Mobile-Auto...
OpenTuesday: Die Selenium-Toolfamilie und ihr Einsatz im Web- und Mobile-Auto...
 
Mobile Test Automation using one API and one infrastructure
Mobile Test Automation using one API and one infrastructureMobile Test Automation using one API and one infrastructure
Mobile Test Automation using one API and one infrastructure
 
Selenium
SeleniumSelenium
Selenium
 
Automated ui-testing
Automated ui-testingAutomated ui-testing
Automated ui-testing
 
selenium-2-mobile-web-testing
selenium-2-mobile-web-testingselenium-2-mobile-web-testing
selenium-2-mobile-web-testing
 
Selenium- A Software Testing Tool
Selenium- A Software Testing ToolSelenium- A Software Testing Tool
Selenium- A Software Testing Tool
 
Mastering Test Automation: How to Use Selenium Successfully
Mastering Test Automation: How to Use Selenium Successfully Mastering Test Automation: How to Use Selenium Successfully
Mastering Test Automation: How to Use Selenium Successfully
 
Testing on Android
Testing on AndroidTesting on Android
Testing on Android
 
Mobile Testing with Selenium 2 by Jason Huggins
Mobile Testing with Selenium 2 by Jason HugginsMobile Testing with Selenium 2 by Jason Huggins
Mobile Testing with Selenium 2 by Jason Huggins
 
Pdx Se Intro To Se
Pdx Se Intro To SePdx Se Intro To Se
Pdx Se Intro To Se
 
#Code2Create:: Introduction to App Development in Flutter with Dart
#Code2Create:: Introduction to App Development in Flutter with Dart#Code2Create:: Introduction to App Development in Flutter with Dart
#Code2Create:: Introduction to App Development in Flutter with Dart
 
Behavior Driven Development by Example
Behavior Driven Development by ExampleBehavior Driven Development by Example
Behavior Driven Development by Example
 
Continuous Delivery, Continuous Integration
Continuous Delivery, Continuous Integration Continuous Delivery, Continuous Integration
Continuous Delivery, Continuous Integration
 
Selenium Tips & Tricks, presented at the Tel Aviv Selenium Meetup
Selenium Tips & Tricks, presented at the Tel Aviv Selenium MeetupSelenium Tips & Tricks, presented at the Tel Aviv Selenium Meetup
Selenium Tips & Tricks, presented at the Tel Aviv Selenium Meetup
 
Selenium Introduction and IDE
Selenium Introduction and IDESelenium Introduction and IDE
Selenium Introduction and IDE
 
Native Android Development with Spring
Native Android Development with SpringNative Android Development with Spring
Native Android Development with Spring
 
Vietnam qa meetup
Vietnam qa meetupVietnam qa meetup
Vietnam qa meetup
 
Phonegap Development & Debugging
Phonegap Development & DebuggingPhonegap Development & Debugging
Phonegap Development & Debugging
 
How to use selenium successfully
How to use selenium successfullyHow to use selenium successfully
How to use selenium successfully
 
SF Gradle Meetup - Netflix OSS
SF Gradle Meetup - Netflix OSSSF Gradle Meetup - Netflix OSS
SF Gradle Meetup - Netflix OSS
 

Recently uploaded

HOA1&2 - Module 3 - PREHISTORCI ARCHITECTURE OF KERALA.pptx
HOA1&2 - Module 3 - PREHISTORCI ARCHITECTURE OF KERALA.pptxHOA1&2 - Module 3 - PREHISTORCI ARCHITECTURE OF KERALA.pptx
HOA1&2 - Module 3 - PREHISTORCI ARCHITECTURE OF KERALA.pptxSCMS School of Architecture
 
Navigating Complexity: The Role of Trusted Partners and VIAS3D in Dassault Sy...
Navigating Complexity: The Role of Trusted Partners and VIAS3D in Dassault Sy...Navigating Complexity: The Role of Trusted Partners and VIAS3D in Dassault Sy...
Navigating Complexity: The Role of Trusted Partners and VIAS3D in Dassault Sy...Arindam Chakraborty, Ph.D., P.E. (CA, TX)
 
kiln thermal load.pptx kiln tgermal load
kiln thermal load.pptx kiln tgermal loadkiln thermal load.pptx kiln tgermal load
kiln thermal load.pptx kiln tgermal loadhamedmustafa094
 
Moment Distribution Method For Btech Civil
Moment Distribution Method For Btech CivilMoment Distribution Method For Btech Civil
Moment Distribution Method For Btech CivilVinayVitekari
 
HAND TOOLS USED AT ELECTRONICS WORK PRESENTED BY KOUSTAV SARKAR
HAND TOOLS USED AT ELECTRONICS WORK PRESENTED BY KOUSTAV SARKARHAND TOOLS USED AT ELECTRONICS WORK PRESENTED BY KOUSTAV SARKAR
HAND TOOLS USED AT ELECTRONICS WORK PRESENTED BY KOUSTAV SARKARKOUSTAV SARKAR
 
DC MACHINE-Motoring and generation, Armature circuit equation
DC MACHINE-Motoring and generation, Armature circuit equationDC MACHINE-Motoring and generation, Armature circuit equation
DC MACHINE-Motoring and generation, Armature circuit equationBhangaleSonal
 
COST-EFFETIVE and Energy Efficient BUILDINGS ptx
COST-EFFETIVE  and Energy Efficient BUILDINGS ptxCOST-EFFETIVE  and Energy Efficient BUILDINGS ptx
COST-EFFETIVE and Energy Efficient BUILDINGS ptxJIT KUMAR GUPTA
 
A CASE STUDY ON CERAMIC INDUSTRY OF BANGLADESH.pptx
A CASE STUDY ON CERAMIC INDUSTRY OF BANGLADESH.pptxA CASE STUDY ON CERAMIC INDUSTRY OF BANGLADESH.pptx
A CASE STUDY ON CERAMIC INDUSTRY OF BANGLADESH.pptxmaisarahman1
 
Online food ordering system project report.pdf
Online food ordering system project report.pdfOnline food ordering system project report.pdf
Online food ordering system project report.pdfKamal Acharya
 
Kuwait City MTP kit ((+919101817206)) Buy Abortion Pills Kuwait
Kuwait City MTP kit ((+919101817206)) Buy Abortion Pills KuwaitKuwait City MTP kit ((+919101817206)) Buy Abortion Pills Kuwait
Kuwait City MTP kit ((+919101817206)) Buy Abortion Pills Kuwaitjaanualu31
 
Standard vs Custom Battery Packs - Decoding the Power Play
Standard vs Custom Battery Packs - Decoding the Power PlayStandard vs Custom Battery Packs - Decoding the Power Play
Standard vs Custom Battery Packs - Decoding the Power PlayEpec Engineered Technologies
 
Unit 4_Part 1 CSE2001 Exception Handling and Function Template and Class Temp...
Unit 4_Part 1 CSE2001 Exception Handling and Function Template and Class Temp...Unit 4_Part 1 CSE2001 Exception Handling and Function Template and Class Temp...
Unit 4_Part 1 CSE2001 Exception Handling and Function Template and Class Temp...drmkjayanthikannan
 
AIRCANVAS[1].pdf mini project for btech students
AIRCANVAS[1].pdf mini project for btech studentsAIRCANVAS[1].pdf mini project for btech students
AIRCANVAS[1].pdf mini project for btech studentsvanyagupta248
 
Wadi Rum luxhotel lodge Analysis case study.pptx
Wadi Rum luxhotel lodge Analysis case study.pptxWadi Rum luxhotel lodge Analysis case study.pptx
Wadi Rum luxhotel lodge Analysis case study.pptxNadaHaitham1
 
Computer Networks Basics of Network Devices
Computer Networks  Basics of Network DevicesComputer Networks  Basics of Network Devices
Computer Networks Basics of Network DevicesChandrakantDivate1
 
School management system project Report.pdf
School management system project Report.pdfSchool management system project Report.pdf
School management system project Report.pdfKamal Acharya
 
Thermal Engineering-R & A / C - unit - V
Thermal Engineering-R & A / C - unit - VThermal Engineering-R & A / C - unit - V
Thermal Engineering-R & A / C - unit - VDineshKumar4165
 
Orlando’s Arnold Palmer Hospital Layout Strategy-1.pptx
Orlando’s Arnold Palmer Hospital Layout Strategy-1.pptxOrlando’s Arnold Palmer Hospital Layout Strategy-1.pptx
Orlando’s Arnold Palmer Hospital Layout Strategy-1.pptxMuhammadAsimMuhammad6
 

Recently uploaded (20)

HOA1&2 - Module 3 - PREHISTORCI ARCHITECTURE OF KERALA.pptx
HOA1&2 - Module 3 - PREHISTORCI ARCHITECTURE OF KERALA.pptxHOA1&2 - Module 3 - PREHISTORCI ARCHITECTURE OF KERALA.pptx
HOA1&2 - Module 3 - PREHISTORCI ARCHITECTURE OF KERALA.pptx
 
Navigating Complexity: The Role of Trusted Partners and VIAS3D in Dassault Sy...
Navigating Complexity: The Role of Trusted Partners and VIAS3D in Dassault Sy...Navigating Complexity: The Role of Trusted Partners and VIAS3D in Dassault Sy...
Navigating Complexity: The Role of Trusted Partners and VIAS3D in Dassault Sy...
 
kiln thermal load.pptx kiln tgermal load
kiln thermal load.pptx kiln tgermal loadkiln thermal load.pptx kiln tgermal load
kiln thermal load.pptx kiln tgermal load
 
Moment Distribution Method For Btech Civil
Moment Distribution Method For Btech CivilMoment Distribution Method For Btech Civil
Moment Distribution Method For Btech Civil
 
HAND TOOLS USED AT ELECTRONICS WORK PRESENTED BY KOUSTAV SARKAR
HAND TOOLS USED AT ELECTRONICS WORK PRESENTED BY KOUSTAV SARKARHAND TOOLS USED AT ELECTRONICS WORK PRESENTED BY KOUSTAV SARKAR
HAND TOOLS USED AT ELECTRONICS WORK PRESENTED BY KOUSTAV SARKAR
 
DC MACHINE-Motoring and generation, Armature circuit equation
DC MACHINE-Motoring and generation, Armature circuit equationDC MACHINE-Motoring and generation, Armature circuit equation
DC MACHINE-Motoring and generation, Armature circuit equation
 
Call Girls in South Ex (delhi) call me [🔝9953056974🔝] escort service 24X7
Call Girls in South Ex (delhi) call me [🔝9953056974🔝] escort service 24X7Call Girls in South Ex (delhi) call me [🔝9953056974🔝] escort service 24X7
Call Girls in South Ex (delhi) call me [🔝9953056974🔝] escort service 24X7
 
COST-EFFETIVE and Energy Efficient BUILDINGS ptx
COST-EFFETIVE  and Energy Efficient BUILDINGS ptxCOST-EFFETIVE  and Energy Efficient BUILDINGS ptx
COST-EFFETIVE and Energy Efficient BUILDINGS ptx
 
A CASE STUDY ON CERAMIC INDUSTRY OF BANGLADESH.pptx
A CASE STUDY ON CERAMIC INDUSTRY OF BANGLADESH.pptxA CASE STUDY ON CERAMIC INDUSTRY OF BANGLADESH.pptx
A CASE STUDY ON CERAMIC INDUSTRY OF BANGLADESH.pptx
 
Online food ordering system project report.pdf
Online food ordering system project report.pdfOnline food ordering system project report.pdf
Online food ordering system project report.pdf
 
Kuwait City MTP kit ((+919101817206)) Buy Abortion Pills Kuwait
Kuwait City MTP kit ((+919101817206)) Buy Abortion Pills KuwaitKuwait City MTP kit ((+919101817206)) Buy Abortion Pills Kuwait
Kuwait City MTP kit ((+919101817206)) Buy Abortion Pills Kuwait
 
Standard vs Custom Battery Packs - Decoding the Power Play
Standard vs Custom Battery Packs - Decoding the Power PlayStandard vs Custom Battery Packs - Decoding the Power Play
Standard vs Custom Battery Packs - Decoding the Power Play
 
Unit 4_Part 1 CSE2001 Exception Handling and Function Template and Class Temp...
Unit 4_Part 1 CSE2001 Exception Handling and Function Template and Class Temp...Unit 4_Part 1 CSE2001 Exception Handling and Function Template and Class Temp...
Unit 4_Part 1 CSE2001 Exception Handling and Function Template and Class Temp...
 
AIRCANVAS[1].pdf mini project for btech students
AIRCANVAS[1].pdf mini project for btech studentsAIRCANVAS[1].pdf mini project for btech students
AIRCANVAS[1].pdf mini project for btech students
 
Wadi Rum luxhotel lodge Analysis case study.pptx
Wadi Rum luxhotel lodge Analysis case study.pptxWadi Rum luxhotel lodge Analysis case study.pptx
Wadi Rum luxhotel lodge Analysis case study.pptx
 
Computer Networks Basics of Network Devices
Computer Networks  Basics of Network DevicesComputer Networks  Basics of Network Devices
Computer Networks Basics of Network Devices
 
School management system project Report.pdf
School management system project Report.pdfSchool management system project Report.pdf
School management system project Report.pdf
 
FEA Based Level 3 Assessment of Deformed Tanks with Fluid Induced Loads
FEA Based Level 3 Assessment of Deformed Tanks with Fluid Induced LoadsFEA Based Level 3 Assessment of Deformed Tanks with Fluid Induced Loads
FEA Based Level 3 Assessment of Deformed Tanks with Fluid Induced Loads
 
Thermal Engineering-R & A / C - unit - V
Thermal Engineering-R & A / C - unit - VThermal Engineering-R & A / C - unit - V
Thermal Engineering-R & A / C - unit - V
 
Orlando’s Arnold Palmer Hospital Layout Strategy-1.pptx
Orlando’s Arnold Palmer Hospital Layout Strategy-1.pptxOrlando’s Arnold Palmer Hospital Layout Strategy-1.pptx
Orlando’s Arnold Palmer Hospital Layout Strategy-1.pptx
 

Selendroid in Action

  • 1. Selendroid in Action Dominik Dary Hamburg Mobile Quality Crew 2015-10-21
  • 2. Who am I? Dominik Dary Engineering Manager @ Twitter: @dominikdary Github: http://github.com/dominikdary Disclaimer: My Opinions are my own. Selendroid in Action
  • 3. Agenda • Short Introdution • After covering the basics about how to find and interact with UI elements, • we will look into techniques of writing maintainable tests. • In the end we will run our tests in parallel using the Selenium Grid. Selendroid in Action
  • 5. W3C WebDriver Spec Selendroid in Action JSON WIRE PROTOCOLClient Java C# Ruby Python i.e. FirefoxDriver, selendroid, ios-driver Server https://dvcs.w3.org/hg/webdriver/raw-file/tip/webdriver-spec.html Selendroid - Supported Methods
  • 6. ONE PROTOCOL TO RULE THEM ALL Selendroid in Action Source: http://en.wikipedia.org/wiki/File:Unico_Anello.png#file
  • 7. Selendroid Open sourced on github: – https://github.com/selendroid Documentation: • https://selendroid.io Committers: – eBay, PayPal, Salesforce, Facebook, Red Hat and many others Getting help – IRC : #selendroid on freenode Selendroid in Action
  • 8. Features – The only mobile WebDriver that supports native & hybrid apps and testing the mobile web on Android versions (API 10 to 23) – Full compatibility with the JSON Wire Protocol. – The app under test must not be modified – No jailbreak / rooting of devices – Interacts simultaneously with multiple Android devices – Supports hot plugging of hardware devices – Advanced Gestures are supported Selendroid in Action
  • 9. Testing In Action Mobile WebHybridNative Selendroid in Action
  • 10. Native Element Selectors • Id Finds the element by Id. • name Finds the element by content description (accessibility label). • link text Finds the element by displayed text. • partial link text Finds the element by partial displayed text. • class Finds the element by full class name (e.g. android.widget.Button). • tag name Finds the element by tag name e.g. button • xpath Finds the element by a xpath expression. Selendroid in Action
  • 11. Selendroid Inspector • View hierarchy • View UI element properties • UI screenshot with view locator • Record the click actions • View HTML of a web view • XPath helper Selendroid in Action Demo: http://youtu.be/JKZeF3eHljo
  • 12. FIRST HANDS ON SESSION Selendroid in Action
  • 13. First Practical Demo • Clone the project: • Open Class: git clone https://github.com/DominikDary/selendroid-workshop.git FirstSelendroidTest Selendroid in Action
  • 14. FirstSelendroidTest • Make sure you have defined an emulator (and started) or connected a hardware device. • Excuting „adb devices“ lists your device • The test automatically starts and stops selendroid Add a breakpoint Selendroid in Action
  • 15. Get Your Hands Dirty • Write a Test – that navigate to the User Registration Screen – Use the Inspector to find the Element details – Use these locators • Id, name, xpath, link text • Goal is to fill out the registration form and • To validate on the following Dialog that the right input Hints: • Debug the test and use the Selendroid Inspector (http://localhost:4444/inspector/ ) • Docu is located here: http://selendroid.io/native.html • Do not over engineer, just write all the stepsSelendroid in Action
  • 16. Selendroid Repl • Interactive Command execution • Results are immediately displayed • The app can be manually used to navigate to the dialog you want to automate. • Interested? Read more: selendroid-workshop/docs/selendroid-python-repl.md Selendroid in Action
  • 18. Pages and Flows e-Commerce shopping site Checkout Page Success Page Shopping Cart PageItem Page View Orderlist View Category Update Delete View Product Search Item View Category Review Select Payment Provider Order Summary Selendroid in Action
  • 20. ANDROID APP TEST CASE Selendroid in Action Tests Flow Objects Page Objects
  • 21. SECOND HANDS ON SESSION Selendroid in Action
  • 22. Use Pages and Flows • If you have not finished the first session, checkout the branch • Please create a Page Object class for every screen • Please create a flow class that delegates to the different pages • Change your test in order to use the flow and page objetcs • Run your tests git checkout resultFirstSession Selendroid in Action
  • 23. Second Result • If you have not finished the first session, checkout the branch git checkout resultSecondSession Selendroid in Action
  • 25. THE IMPORTANCE OF PARALLEL TEST EXECUTION • Multiple Apps • Multiple Locales • iOS Devices – iPhone vs. iPad – Version • Android Devices – Manufactures – Screen Sizes – OS Modifications Selendroid in Action Picture Source: http://www.flickr.com/photos/ippei-janine/483345027/
  • 26. Scaling using the Selenium Grid Selendroid in Action Client serverGRID HubClient CI server server
  • 27. THIRD HANDS ON SESSION Selendroid in Action
  • 28. Startup a Grid • Start selenium grid • Start Selendroid and Register to Grid http://selendroid.io/scale.html java -jar selendroid-standalone-0.16.0-SNAPSHOT-with-dependencies.jar -app selendroid-test-app-0.16.0-SNAPSHOT.apk -port 5555 -hub http://127.0.0.1:4444/grid/register -proxy io.selendroid.grid.SelendroidSessionProxy -host 127.0.0.1 java -Dfile.encoding=UTF-8 -cp "selendroid-grid-plugin-0.16.0- SNAPSHOT.jar:selenium-server-standalone-2.45.0.jar" org.openqa.grid.selenium.GridLauncher -capabilityMatcher io.selendroid.grid.SelendroidCapabilityMatcher -role hub -host 127.0.0.1 -port 4444 Selendroid in Action
  • 29. In Action • After you have started the grid – Check if everything is fine: – Grid: http://127.0.0.1:4444/grid/console – Selendroid Standalone: http://127.0.0.1:5555/wd/hub/status • Open any previous test – Deactive Code that starts selendroid – Run your test Selendroid in Action
  • 31. Future • Adding uiautomator2 support • Release Selendroid 1.0 Selendroid in Action
  • 32. We are looking for contributors and Image Source: https://c2.staticflickr.com/8/7350/9665734904_38a85f1be5_b.jpg Selendroid in Action
  • 33. Thank You! Questions or Comments? Selendroid in Action
  • 34. Contact & Getting help IRC : #selendroid on freenode Mailing List: http://groups.google.com/group/selendroid Selendroid in Action
  • 35. Videos: Selendroid in Action – Native Demo: http://youtu.be/074BnGV0mS0 – Hybrid Demo: http://youtu.be/FGsKI6esKpw – Mobile Web Demo: http://goo.gl/41uvAx – Selendroid Article: http://www.methodsandtools.com/tools/selendroid.php Selendroid in Action
  • 37. Multi Touch Support • Single finger example: TouchAction ta = new TouchActionBuilder().pointerDown(). pointerMove(x, y).pointerUp().build(); driver.getMultiTouchScreen().executeAction(ta); • Multi finger example (these will be executed in parallel): TouchAction finger1 = new TouchActionBuilder().pointerDown().pause(100). pointerMove(x, y).pointerUp().build(); TouchAction finger2 = new TouchActionBuilder().pointerDown().pause(100). pointerMove(x, y).pointerUp().build(); MultiTouchAction multiAction = new MultiTouchAction(finger1, finger2); driver.getMultiTouchScreen().executeAction(multiAction); Selendroid in Action
  • 38. Touch Gestures Session • Start Selendroid Test App • Press „Touch Actions“ Button • This Activity can be used to – try Touch Gestures – Identified gestures will be displayed Selendroid in Action