SlideShare a Scribd company logo
§
January 2015
Appium Meetup #2
Mobile Web Automation Introduction
Sergio Neves Barros
QA Automation Technical Lead
January 2015
1. Who and what
2. A bit of history
3. Setup
4. Writing tests
5. Test execution (demo)
6. Questions
Overview
January 2015
Who and what
Who I am:
For over 10 years I have been working as a tester across various industries such as Insurance,
Banking and Gaming. Around 3 years ago I joined Gamesys and we have been developing and
maintaining our test automation and training QA’s on testing and test automation best
practices. As a team we have developed various drivers to interact/interrogate the
technologies we test (e.g. Flash/HTML5 Canvas) and also contributed to open source tools.
What we do at Gamesys:
Gamesys develops and manages various sites such as Jackpotjoy, SunBingo, HeartBingo and
Virgin Games for which we develop and test a wide variety games such as Slots, Bingo and
Poker. We also work with quite a few technologies such as HTML5 Canvas, Flash,
Android and iOS, which as you can imagine makes testing a real challenge.
January 2015
A bit of history
My question (April 2013):
“I am trying to grab the window_handles on the WebViewApp and this is working
fine on a iphone simulator, however it's throwing an unhandled exception
on a real device”
Jonathan Lipps:
“This is unfortunately expected. Webview support works by creating a TCP connection
to the remote webkit debugger run in Safari/webviews. Even though
the real device might be running a webkit debugger, it's almost
definitely not forwarding that port to the host, where appium is running.
Someone will need to figure out how to reverse engineer the USB debugging
protocol and forward the port from the device to the host---
sounds like it will be challenging at best and maybe impossible at worst.”
Luckily someone had already figured a way to forward requests to a physical
device and we just connected the dots.
January 2015
Setup - Safari on iOS Simulator
To run a your mobile web tests on a simulator you will need the following tools.
• Xcode (including command line tools)
• Can be installed from the App store or from the Apple developer portal.
• Any additional Simulators can be downloaded in preferences.
• Nodejs
• Simply download and install nodejs.
• Appium
• To run the simulator tests you can use:
• the Appium app
• or clone the project and run “./reset.sh --ios”
January 2015
In addition to the previous setup, to run your mobile web tests on safari on a physical device you will need
the Safari Launcher and the ios-webkit-debugger-proxy.
• Safari Launcher app
• Add “--real-safari” argument when running reset.sh
• To build & install safari you will need a valid development profile (figure 1)
• NOTE: You can not use the Appium App to install the safari launcher on a device.
Figure1: iOS development provisioning profile setup
• ios-webkit-debugger-proxy
• Can be installed using brew
• Turn on web inspector (available on iOS 6.0 or higher) in Safari settings.
• NOTE: due to an issue with the proxy you should use the proxy launcher script.
Setup – Safari on iOS Device
Device Id(s)
App Id (or wildcard)
Development Certificate(s)
Development Provisioning
Profile
January 2015
Setup – Chrome on Android Device
To run a your mobile web tests on an Android Device with Chrome you will need:
• Android SDK
• Make sure you install the relevant API for the version of Android you want to test against.
• Just run “android” in the terminal and the android sdk manager will launch where you can
install additional API’s.
• Also make sure to:
• configure ANDROID_HOME
• and add both the tools & platform-tools folder to your PATH.
• Nodejs
• Simply download and install nodejs.
• Appium
• To run the emulator tests you can use the Appium app or clone the project and run:
• “reset.sh –android”
NOTE: You can not (simply) install chrome on an emulator through the app store
(as emulator doesn’t have the the app store). You will have to find a valid version of
the chrome app (built for the right architecture).
January 2015
Writing tests – Useful tools
Chrome Debugger (Android):
• You can use the Chrome Debugger by going to chrome://inspect on your desktop chrome.
• Make sure that:
• Your android device is attached and unlocked
• Remote debugging is turned on in developer options
• Chrome is installed on the android device.
Safari Debugger (iOS):
• You can use the Safari Debugger by going to the develop menu
• Make sure that:
• Your iOS device is attached and unlocked or your simulator is started.
• That “web inspector” is turned on (iOS 6.0 and higher) on your device.
The debuggers will allow you to:
• Inspect web elements e.g. to get element identifiers.
• Execute JavaScript on the pages
• Trick: xpath checker: $x("//*[@name='q']")
• Trigger a listener (mouse up/down etc..)
• See any errors in the javascript logs.
• See the page (Chrome only)
January 2015
Writing tests – Java Client
• Appium Java Client:
• The drivers extend the RemoteWebDriver
• The iOS Driver and Android Driver both have platform specific
configuration and methods already added.
• Simply add the maven dependency to your project (e.g. similar to
Selenium) and start using the iOS Driver/Android Driver
• Can be found on github:
• https://github.com/appium/java-client
• Selenium Tests Reusable:
• When writing your tests you can re-use your existing selenium tests
• The only real difference will be the desired capabilities:
• platformName: iOS, Android, FirefoxOS
• platformVersion: 4.2.2, 8.1, 7.1
• automationName: Appium, Selendroid (Android specific)
• deviceName: iPad 2, Galaxy S5
• browserName: Chrome, Safari
January 2015
Executing tests
Starting Appium Server (app/terminal):
• You can either use the appium app to start the server
• And it will display all the possible arguments
• Or you can run the following command in the terminal:
• > node lib/server/main.js
• Add “—help” to see all the arguments
Demo Time!
This is the bit where I make a fool out of myself with a live
demo …murphy’s law.
Note: the demo maven project can be found here
§
January 2015
Questions?

More Related Content

What's hot

Appium solution
Appium solutionAppium solution
Appium solution
Nael Abd Eljawad
 
Appium workshop technopark trivandrum
Appium workshop technopark trivandrumAppium workshop technopark trivandrum
Appium workshop technopark trivandrum
Syam Sasi
 
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
 
Cross Platform Appium Tests: How To
Cross Platform Appium Tests: How ToCross Platform Appium Tests: How To
Cross Platform Appium Tests: How To
GlobalLogic Ukraine
 
Appium overview
Appium overviewAppium overview
Appium overview
Abhishek Yadav
 
Appium basics
Appium basicsAppium basics
Appium basics
Syam Sasi
 
Introduction To Appium With Robotframework
Introduction To Appium With RobotframeworkIntroduction To Appium With Robotframework
Introduction To Appium With Robotframework
Syam Sasi
 
#Fame case study
#Fame case study#Fame case study
#Fame case study
Keshav Kashyap
 
Appium Interview Questions and Answers | Edureka
Appium Interview Questions and Answers | EdurekaAppium Interview Questions and Answers | Edureka
Appium Interview Questions and Answers | Edureka
Edureka!
 
Android UI Testing with Appium
Android UI Testing with AppiumAndroid UI Testing with Appium
Android UI Testing with Appium
Luke Maung
 
Mobile Test Automation - Appium
Mobile Test Automation - AppiumMobile Test Automation - Appium
Mobile Test Automation - Appium
Maria Machlowska
 
Appium Mobile Test Automation like WebDriver
Appium Mobile Test Automation like WebDriverAppium Mobile Test Automation like WebDriver
Appium Mobile Test Automation like WebDriverAndrii Dzynia
 
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
 
Automated UI Testing Frameworks
Automated UI Testing FrameworksAutomated UI Testing Frameworks
Automated UI Testing Frameworks
TestObject - Mobile Testing
 
Getting Started with Mobile Test Automation & Appium
Getting Started with Mobile Test Automation & AppiumGetting Started with Mobile Test Automation & Appium
Getting Started with Mobile Test Automation & Appium
Sauce Labs
 
Appium troubleshooting
Appium troubleshootingAppium troubleshooting
Appium troubleshooting
adi ben aroya
 
What's New With Appium? From 1.0 to Now
What's New With Appium? From 1.0 to NowWhat's New With Appium? From 1.0 to Now
What's New With Appium? From 1.0 to Now
Sauce Labs
 
Appium: Mobile Automation Made Awesome
Appium: Mobile Automation Made AwesomeAppium: Mobile Automation Made Awesome
Appium: Mobile Automation Made Awesome
Netcetera
 
Advanced Appium Tips & Tricks with Jonathan Lipps
Advanced Appium Tips & Tricks with Jonathan LippsAdvanced Appium Tips & Tricks with Jonathan Lipps
Advanced Appium Tips & Tricks with Jonathan Lipps
Perfecto by Perforce
 

What's hot (20)

Appium solution
Appium solutionAppium solution
Appium solution
 
Appium workshop technopark trivandrum
Appium workshop technopark trivandrumAppium workshop technopark trivandrum
Appium workshop technopark trivandrum
 
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?)
 
Cross Platform Appium Tests: How To
Cross Platform Appium Tests: How ToCross Platform Appium Tests: How To
Cross Platform Appium Tests: How To
 
Appium overview
Appium overviewAppium overview
Appium overview
 
Appium basics
Appium basicsAppium basics
Appium basics
 
Introduction To Appium With Robotframework
Introduction To Appium With RobotframeworkIntroduction To Appium With Robotframework
Introduction To Appium With Robotframework
 
#Fame case study
#Fame case study#Fame case study
#Fame case study
 
Appium Interview Questions and Answers | Edureka
Appium Interview Questions and Answers | EdurekaAppium Interview Questions and Answers | Edureka
Appium Interview Questions and Answers | Edureka
 
Android UI Testing with Appium
Android UI Testing with AppiumAndroid UI Testing with Appium
Android UI Testing with Appium
 
Mobile Test Automation - Appium
Mobile Test Automation - AppiumMobile Test Automation - Appium
Mobile Test Automation - Appium
 
Appium Mobile Test Automation like WebDriver
Appium Mobile Test Automation like WebDriverAppium Mobile Test Automation like WebDriver
Appium Mobile Test Automation like WebDriver
 
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
 
Automated UI Testing Frameworks
Automated UI Testing FrameworksAutomated UI Testing Frameworks
Automated UI Testing Frameworks
 
Getting Started with Mobile Test Automation & Appium
Getting Started with Mobile Test Automation & AppiumGetting Started with Mobile Test Automation & Appium
Getting Started with Mobile Test Automation & Appium
 
Appium troubleshooting
Appium troubleshootingAppium troubleshooting
Appium troubleshooting
 
What's New With Appium? From 1.0 to Now
What's New With Appium? From 1.0 to NowWhat's New With Appium? From 1.0 to Now
What's New With Appium? From 1.0 to Now
 
Appium: Mobile Automation Made Awesome
Appium: Mobile Automation Made AwesomeAppium: Mobile Automation Made Awesome
Appium: Mobile Automation Made Awesome
 
Advanced Appium Tips & Tricks with Jonathan Lipps
Advanced Appium Tips & Tricks with Jonathan LippsAdvanced Appium Tips & Tricks with Jonathan Lipps
Advanced Appium Tips & Tricks with Jonathan Lipps
 

Similar to Appium Meetup #2 - Mobile Web Automation Introduction

DevOps on AWS: Deep Dive on Continuous Delivery and the AWS Developer Tools
DevOps on AWS: Deep Dive on Continuous Delivery and the AWS Developer ToolsDevOps on AWS: Deep Dive on Continuous Delivery and the AWS Developer Tools
DevOps on AWS: Deep Dive on Continuous Delivery and the AWS Developer Tools
Amazon Web Services
 
Appium overview (Selenium Israel #2, Feb. 2014)
Appium overview (Selenium Israel #2, Feb. 2014)Appium overview (Selenium Israel #2, Feb. 2014)
Appium overview (Selenium Israel #2, Feb. 2014)
danielputerman
 
Continous Integration for iOS Projects
Continous Integration for iOS ProjectsContinous Integration for iOS Projects
Continous Integration for iOS ProjectsCiprian Redinciuc
 
ATAGTR2017 Appium
ATAGTR2017 AppiumATAGTR2017 Appium
ATAGTR2017 Appium
Agile Testing Alliance
 
Appium Overview - by Daniel Puterman
Appium Overview - by Daniel PutermanAppium Overview - by Daniel Puterman
Appium Overview - by Daniel Puterman
Applitools
 
Appium- part 1
Appium- part 1Appium- part 1
Appium- part 1
Mithilesh Singh
 
Automation using Javascript
Automation using JavascriptAutomation using Javascript
Automation using Javascript
khanhdang1214
 
Building High Quality Android Applications
Building High Quality Android ApplicationsBuilding High Quality Android Applications
Building High Quality Android Applications
Leif Janzik
 
Selenium Camp 2016 - Kiev, Ukraine
Selenium Camp 2016 -  Kiev, UkraineSelenium Camp 2016 -  Kiev, Ukraine
Selenium Camp 2016 - Kiev, Ukraine
Justin Ison
 
Browser_Stack_Intro
Browser_Stack_IntroBrowser_Stack_Intro
Browser_Stack_Intro
Mithilesh Singh
 
Dev ops on aws deep dive on continuous delivery - Toronto
Dev ops on aws deep dive on continuous delivery - TorontoDev ops on aws deep dive on continuous delivery - Toronto
Dev ops on aws deep dive on continuous delivery - Toronto
Amazon Web Services
 
DevOps On AWS - Deep Dive on Continuous Delivery
DevOps On AWS - Deep Dive on Continuous DeliveryDevOps On AWS - Deep Dive on Continuous Delivery
DevOps On AWS - Deep Dive on Continuous Delivery
Mikhail Prudnikov
 
Mobile UI Testing using Appium and Docker
Mobile UI Testing using Appium and DockerMobile UI Testing using Appium and Docker
Mobile UI Testing using Appium and Docker
Moataz Nabil
 
Closer To the Metal - Why and How We Use XCTest and Espresso by Mario Negro P...
Closer To the Metal - Why and How We Use XCTest and Espresso by Mario Negro P...Closer To the Metal - Why and How We Use XCTest and Espresso by Mario Negro P...
Closer To the Metal - Why and How We Use XCTest and Espresso by Mario Negro P...
Sauce Labs
 
Philip Shurpik "Architecting React Native app"
Philip Shurpik "Architecting React Native app"Philip Shurpik "Architecting React Native app"
Philip Shurpik "Architecting React Native app"
Fwdays
 
Phonegap Development & Debugging
Phonegap Development & DebuggingPhonegap Development & Debugging
Phonegap Development & Debugging
Ivano Malavolta
 
Django simplified : by weever mbakaya
Django simplified : by weever mbakayaDjango simplified : by weever mbakaya
Django simplified : by weever mbakaya
Mbakaya Kwatukha
 
NCDevCon 2017 - Cross Platform Mobile Apps
NCDevCon 2017 - Cross Platform Mobile AppsNCDevCon 2017 - Cross Platform Mobile Apps
NCDevCon 2017 - Cross Platform Mobile Apps
John M. Wargo
 
DevOps on AWS: Deep Dive on Continuous Delivery and the AWS Developer Tools
DevOps on AWS: Deep Dive on Continuous Delivery and the AWS Developer ToolsDevOps on AWS: Deep Dive on Continuous Delivery and the AWS Developer Tools
DevOps on AWS: Deep Dive on Continuous Delivery and the AWS Developer Tools
Amazon Web Services
 
Android Application Development Using Java
Android Application Development Using JavaAndroid Application Development Using Java
Android Application Development Using Java
amaankhan
 

Similar to Appium Meetup #2 - Mobile Web Automation Introduction (20)

DevOps on AWS: Deep Dive on Continuous Delivery and the AWS Developer Tools
DevOps on AWS: Deep Dive on Continuous Delivery and the AWS Developer ToolsDevOps on AWS: Deep Dive on Continuous Delivery and the AWS Developer Tools
DevOps on AWS: Deep Dive on Continuous Delivery and the AWS Developer Tools
 
Appium overview (Selenium Israel #2, Feb. 2014)
Appium overview (Selenium Israel #2, Feb. 2014)Appium overview (Selenium Israel #2, Feb. 2014)
Appium overview (Selenium Israel #2, Feb. 2014)
 
Continous Integration for iOS Projects
Continous Integration for iOS ProjectsContinous Integration for iOS Projects
Continous Integration for iOS Projects
 
ATAGTR2017 Appium
ATAGTR2017 AppiumATAGTR2017 Appium
ATAGTR2017 Appium
 
Appium Overview - by Daniel Puterman
Appium Overview - by Daniel PutermanAppium Overview - by Daniel Puterman
Appium Overview - by Daniel Puterman
 
Appium- part 1
Appium- part 1Appium- part 1
Appium- part 1
 
Automation using Javascript
Automation using JavascriptAutomation using Javascript
Automation using Javascript
 
Building High Quality Android Applications
Building High Quality Android ApplicationsBuilding High Quality Android Applications
Building High Quality Android Applications
 
Selenium Camp 2016 - Kiev, Ukraine
Selenium Camp 2016 -  Kiev, UkraineSelenium Camp 2016 -  Kiev, Ukraine
Selenium Camp 2016 - Kiev, Ukraine
 
Browser_Stack_Intro
Browser_Stack_IntroBrowser_Stack_Intro
Browser_Stack_Intro
 
Dev ops on aws deep dive on continuous delivery - Toronto
Dev ops on aws deep dive on continuous delivery - TorontoDev ops on aws deep dive on continuous delivery - Toronto
Dev ops on aws deep dive on continuous delivery - Toronto
 
DevOps On AWS - Deep Dive on Continuous Delivery
DevOps On AWS - Deep Dive on Continuous DeliveryDevOps On AWS - Deep Dive on Continuous Delivery
DevOps On AWS - Deep Dive on Continuous Delivery
 
Mobile UI Testing using Appium and Docker
Mobile UI Testing using Appium and DockerMobile UI Testing using Appium and Docker
Mobile UI Testing using Appium and Docker
 
Closer To the Metal - Why and How We Use XCTest and Espresso by Mario Negro P...
Closer To the Metal - Why and How We Use XCTest and Espresso by Mario Negro P...Closer To the Metal - Why and How We Use XCTest and Espresso by Mario Negro P...
Closer To the Metal - Why and How We Use XCTest and Espresso by Mario Negro P...
 
Philip Shurpik "Architecting React Native app"
Philip Shurpik "Architecting React Native app"Philip Shurpik "Architecting React Native app"
Philip Shurpik "Architecting React Native app"
 
Phonegap Development & Debugging
Phonegap Development & DebuggingPhonegap Development & Debugging
Phonegap Development & Debugging
 
Django simplified : by weever mbakaya
Django simplified : by weever mbakayaDjango simplified : by weever mbakaya
Django simplified : by weever mbakaya
 
NCDevCon 2017 - Cross Platform Mobile Apps
NCDevCon 2017 - Cross Platform Mobile AppsNCDevCon 2017 - Cross Platform Mobile Apps
NCDevCon 2017 - Cross Platform Mobile Apps
 
DevOps on AWS: Deep Dive on Continuous Delivery and the AWS Developer Tools
DevOps on AWS: Deep Dive on Continuous Delivery and the AWS Developer ToolsDevOps on AWS: Deep Dive on Continuous Delivery and the AWS Developer Tools
DevOps on AWS: Deep Dive on Continuous Delivery and the AWS Developer Tools
 
Android Application Development Using Java
Android Application Development Using JavaAndroid Application Development Using Java
Android Application Development Using Java
 

Recently uploaded

GlobusWorld 2024 Opening Keynote session
GlobusWorld 2024 Opening Keynote sessionGlobusWorld 2024 Opening Keynote session
GlobusWorld 2024 Opening Keynote session
Globus
 
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
 
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
 
Globus Compute wth IRI Workflows - GlobusWorld 2024
Globus Compute wth IRI Workflows - GlobusWorld 2024Globus Compute wth IRI Workflows - GlobusWorld 2024
Globus Compute wth IRI Workflows - GlobusWorld 2024
Globus
 
Climate Science Flows: Enabling Petabyte-Scale Climate Analysis with the Eart...
Climate Science Flows: Enabling Petabyte-Scale Climate Analysis with the Eart...Climate Science Flows: Enabling Petabyte-Scale Climate Analysis with the Eart...
Climate Science Flows: Enabling Petabyte-Scale Climate Analysis with the Eart...
Globus
 
Cracking the code review at SpringIO 2024
Cracking the code review at SpringIO 2024Cracking the code review at SpringIO 2024
Cracking the code review at SpringIO 2024
Paco van Beckhoven
 
Using IESVE for Room Loads Analysis - Australia & New Zealand
Using IESVE for Room Loads Analysis - Australia & New ZealandUsing IESVE for Room Loads Analysis - Australia & New Zealand
Using IESVE for Room Loads Analysis - Australia & New Zealand
IES VE
 
Lecture 1 Introduction to games development
Lecture 1 Introduction to games developmentLecture 1 Introduction to games development
Lecture 1 Introduction to games development
abdulrafaychaudhry
 
Field Employee Tracking System| MiTrack App| Best Employee Tracking Solution|...
Field Employee Tracking System| MiTrack App| Best Employee Tracking Solution|...Field Employee Tracking System| MiTrack App| Best Employee Tracking Solution|...
Field Employee Tracking System| MiTrack App| Best Employee Tracking Solution|...
informapgpstrackings
 
2024 RoOUG Security model for the cloud.pptx
2024 RoOUG Security model for the cloud.pptx2024 RoOUG Security model for the cloud.pptx
2024 RoOUG Security model for the cloud.pptx
Georgi Kodinov
 
Dominate Social Media with TubeTrivia AI’s Addictive Quiz Videos.pdf
Dominate Social Media with TubeTrivia AI’s Addictive Quiz Videos.pdfDominate Social Media with TubeTrivia AI’s Addictive Quiz Videos.pdf
Dominate Social Media with TubeTrivia AI’s Addictive Quiz Videos.pdf
AMB-Review
 
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
 
Globus Compute Introduction - GlobusWorld 2024
Globus Compute Introduction - GlobusWorld 2024Globus Compute Introduction - GlobusWorld 2024
Globus Compute Introduction - GlobusWorld 2024
Globus
 
How Recreation Management Software Can Streamline Your Operations.pptx
How Recreation Management Software Can Streamline Your Operations.pptxHow Recreation Management Software Can Streamline Your Operations.pptx
How Recreation Management Software Can Streamline Your Operations.pptx
wottaspaceseo
 
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
 
A Comprehensive Look at Generative AI in Retail App Testing.pdf
A Comprehensive Look at Generative AI in Retail App Testing.pdfA Comprehensive Look at Generative AI in Retail App Testing.pdf
A Comprehensive Look at Generative AI in Retail App Testing.pdf
kalichargn70th171
 
Large Language Models and the End of Programming
Large Language Models and the End of ProgrammingLarge Language Models and the End of Programming
Large Language Models and the End of Programming
Matt Welsh
 
Quarkus Hidden and Forbidden Extensions
Quarkus Hidden and Forbidden ExtensionsQuarkus Hidden and Forbidden Extensions
Quarkus Hidden and Forbidden Extensions
Max Andersen
 
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
 
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
 

Recently uploaded (20)

GlobusWorld 2024 Opening Keynote session
GlobusWorld 2024 Opening Keynote sessionGlobusWorld 2024 Opening Keynote session
GlobusWorld 2024 Opening Keynote session
 
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
 
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
 
Globus Compute wth IRI Workflows - GlobusWorld 2024
Globus Compute wth IRI Workflows - GlobusWorld 2024Globus Compute wth IRI Workflows - GlobusWorld 2024
Globus Compute wth IRI Workflows - GlobusWorld 2024
 
Climate Science Flows: Enabling Petabyte-Scale Climate Analysis with the Eart...
Climate Science Flows: Enabling Petabyte-Scale Climate Analysis with the Eart...Climate Science Flows: Enabling Petabyte-Scale Climate Analysis with the Eart...
Climate Science Flows: Enabling Petabyte-Scale Climate Analysis with the Eart...
 
Cracking the code review at SpringIO 2024
Cracking the code review at SpringIO 2024Cracking the code review at SpringIO 2024
Cracking the code review at SpringIO 2024
 
Using IESVE for Room Loads Analysis - Australia & New Zealand
Using IESVE for Room Loads Analysis - Australia & New ZealandUsing IESVE for Room Loads Analysis - Australia & New Zealand
Using IESVE for Room Loads Analysis - Australia & New Zealand
 
Lecture 1 Introduction to games development
Lecture 1 Introduction to games developmentLecture 1 Introduction to games development
Lecture 1 Introduction to games development
 
Field Employee Tracking System| MiTrack App| Best Employee Tracking Solution|...
Field Employee Tracking System| MiTrack App| Best Employee Tracking Solution|...Field Employee Tracking System| MiTrack App| Best Employee Tracking Solution|...
Field Employee Tracking System| MiTrack App| Best Employee Tracking Solution|...
 
2024 RoOUG Security model for the cloud.pptx
2024 RoOUG Security model for the cloud.pptx2024 RoOUG Security model for the cloud.pptx
2024 RoOUG Security model for the cloud.pptx
 
Dominate Social Media with TubeTrivia AI’s Addictive Quiz Videos.pdf
Dominate Social Media with TubeTrivia AI’s Addictive Quiz Videos.pdfDominate Social Media with TubeTrivia AI’s Addictive Quiz Videos.pdf
Dominate Social Media with TubeTrivia AI’s Addictive Quiz Videos.pdf
 
Enterprise Resource Planning System in Telangana
Enterprise Resource Planning System in TelanganaEnterprise Resource Planning System in Telangana
Enterprise Resource Planning System in Telangana
 
Globus Compute Introduction - GlobusWorld 2024
Globus Compute Introduction - GlobusWorld 2024Globus Compute Introduction - GlobusWorld 2024
Globus Compute Introduction - GlobusWorld 2024
 
How Recreation Management Software Can Streamline Your Operations.pptx
How Recreation Management Software Can Streamline Your Operations.pptxHow Recreation Management Software Can Streamline Your Operations.pptx
How Recreation Management Software Can Streamline Your Operations.pptx
 
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...
 
A Comprehensive Look at Generative AI in Retail App Testing.pdf
A Comprehensive Look at Generative AI in Retail App Testing.pdfA Comprehensive Look at Generative AI in Retail App Testing.pdf
A Comprehensive Look at Generative AI in Retail App Testing.pdf
 
Large Language Models and the End of Programming
Large Language Models and the End of ProgrammingLarge Language Models and the End of Programming
Large Language Models and the End of Programming
 
Quarkus Hidden and Forbidden Extensions
Quarkus Hidden and Forbidden ExtensionsQuarkus Hidden and Forbidden Extensions
Quarkus Hidden and Forbidden Extensions
 
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...
 
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
 

Appium Meetup #2 - Mobile Web Automation Introduction

  • 1. § January 2015 Appium Meetup #2 Mobile Web Automation Introduction Sergio Neves Barros QA Automation Technical Lead
  • 2. January 2015 1. Who and what 2. A bit of history 3. Setup 4. Writing tests 5. Test execution (demo) 6. Questions Overview
  • 3. January 2015 Who and what Who I am: For over 10 years I have been working as a tester across various industries such as Insurance, Banking and Gaming. Around 3 years ago I joined Gamesys and we have been developing and maintaining our test automation and training QA’s on testing and test automation best practices. As a team we have developed various drivers to interact/interrogate the technologies we test (e.g. Flash/HTML5 Canvas) and also contributed to open source tools. What we do at Gamesys: Gamesys develops and manages various sites such as Jackpotjoy, SunBingo, HeartBingo and Virgin Games for which we develop and test a wide variety games such as Slots, Bingo and Poker. We also work with quite a few technologies such as HTML5 Canvas, Flash, Android and iOS, which as you can imagine makes testing a real challenge.
  • 4. January 2015 A bit of history My question (April 2013): “I am trying to grab the window_handles on the WebViewApp and this is working fine on a iphone simulator, however it's throwing an unhandled exception on a real device” Jonathan Lipps: “This is unfortunately expected. Webview support works by creating a TCP connection to the remote webkit debugger run in Safari/webviews. Even though the real device might be running a webkit debugger, it's almost definitely not forwarding that port to the host, where appium is running. Someone will need to figure out how to reverse engineer the USB debugging protocol and forward the port from the device to the host--- sounds like it will be challenging at best and maybe impossible at worst.” Luckily someone had already figured a way to forward requests to a physical device and we just connected the dots.
  • 5. January 2015 Setup - Safari on iOS Simulator To run a your mobile web tests on a simulator you will need the following tools. • Xcode (including command line tools) • Can be installed from the App store or from the Apple developer portal. • Any additional Simulators can be downloaded in preferences. • Nodejs • Simply download and install nodejs. • Appium • To run the simulator tests you can use: • the Appium app • or clone the project and run “./reset.sh --ios”
  • 6. January 2015 In addition to the previous setup, to run your mobile web tests on safari on a physical device you will need the Safari Launcher and the ios-webkit-debugger-proxy. • Safari Launcher app • Add “--real-safari” argument when running reset.sh • To build & install safari you will need a valid development profile (figure 1) • NOTE: You can not use the Appium App to install the safari launcher on a device. Figure1: iOS development provisioning profile setup • ios-webkit-debugger-proxy • Can be installed using brew • Turn on web inspector (available on iOS 6.0 or higher) in Safari settings. • NOTE: due to an issue with the proxy you should use the proxy launcher script. Setup – Safari on iOS Device Device Id(s) App Id (or wildcard) Development Certificate(s) Development Provisioning Profile
  • 7. January 2015 Setup – Chrome on Android Device To run a your mobile web tests on an Android Device with Chrome you will need: • Android SDK • Make sure you install the relevant API for the version of Android you want to test against. • Just run “android” in the terminal and the android sdk manager will launch where you can install additional API’s. • Also make sure to: • configure ANDROID_HOME • and add both the tools & platform-tools folder to your PATH. • Nodejs • Simply download and install nodejs. • Appium • To run the emulator tests you can use the Appium app or clone the project and run: • “reset.sh –android” NOTE: You can not (simply) install chrome on an emulator through the app store (as emulator doesn’t have the the app store). You will have to find a valid version of the chrome app (built for the right architecture).
  • 8. January 2015 Writing tests – Useful tools Chrome Debugger (Android): • You can use the Chrome Debugger by going to chrome://inspect on your desktop chrome. • Make sure that: • Your android device is attached and unlocked • Remote debugging is turned on in developer options • Chrome is installed on the android device. Safari Debugger (iOS): • You can use the Safari Debugger by going to the develop menu • Make sure that: • Your iOS device is attached and unlocked or your simulator is started. • That “web inspector” is turned on (iOS 6.0 and higher) on your device. The debuggers will allow you to: • Inspect web elements e.g. to get element identifiers. • Execute JavaScript on the pages • Trick: xpath checker: $x("//*[@name='q']") • Trigger a listener (mouse up/down etc..) • See any errors in the javascript logs. • See the page (Chrome only)
  • 9. January 2015 Writing tests – Java Client • Appium Java Client: • The drivers extend the RemoteWebDriver • The iOS Driver and Android Driver both have platform specific configuration and methods already added. • Simply add the maven dependency to your project (e.g. similar to Selenium) and start using the iOS Driver/Android Driver • Can be found on github: • https://github.com/appium/java-client • Selenium Tests Reusable: • When writing your tests you can re-use your existing selenium tests • The only real difference will be the desired capabilities: • platformName: iOS, Android, FirefoxOS • platformVersion: 4.2.2, 8.1, 7.1 • automationName: Appium, Selendroid (Android specific) • deviceName: iPad 2, Galaxy S5 • browserName: Chrome, Safari
  • 10. January 2015 Executing tests Starting Appium Server (app/terminal): • You can either use the appium app to start the server • And it will display all the possible arguments • Or you can run the following command in the terminal: • > node lib/server/main.js • Add “—help” to see all the arguments Demo Time! This is the bit where I make a fool out of myself with a live demo …murphy’s law. Note: the demo maven project can be found here

Editor's Notes

  1. For more information on myself: https://www.linkedin.com/profile/view?id=12608927 For more information on gamesys go to: http://www.gamesyscorporate.com/
  2. Link to quote: https://groups.google.com/forum/#!topic/appium-discuss/u1ropm4OEbY
  3. The communicate with safari on the simulator appium uses the WebInspector Protocol. No obstacles to communicate between simulator and Appium
  4. However on a physical device the communication happens through the cable (and therefore we need the ios-webkit-debugger-proxy) You also need the safariLauncher to navigate to a url which triggers safari to be launched (as instruments can not launch safari on a physical device). The unique identifier of a device can be found in Xcode (xcode \ window \ devices) You can also provide your own code signing identity and/or profile. Description: https://github.com/appium/appium/blob/master/docs/en/writing-running-appium/mobile-web.md Two fixes for instability with ios-webkit-debug-proxy: Use the following command in the appium folder to launch the proxy. ./bin/ios-webkit-debug-proxy-launcher.js -c <udid>:27753 Or use the fix by James https://github.com/jchuong/ios-webkit-debug-proxy You will have to build and run it yourself using the following commands: > ./autogen.sh > ./configure > make src/.ios_webkit_debug_proxy –c <udid>:27753 –d
  5. Once you have the Android SDK setup and installed run the command “android” in the terminal to show the API version and the Android versions. NOTE: To build the latest version of Selendroid you need Java 7.
  6. Tutorial on how to debug chrome on Android: https://developer.chrome.com/devtools/docs/remote-debugging Protocol that google uses to debug. https://developer.chrome.com/devtools/docs/protocol/1.1/index Safari Web Inspector: https://developer.apple.com/safari/tools/
  7. Java Client Dependency: <dependency> <groupId>io.appium</groupId> <artifactId>java-client</artifactId> <version>2.1.0</version> </dependency>
  8. Demo project can be found here: https://drive.google.com/file/d/0ByIdcWPvw1I3Ny1QWkJzZWpvbzA/view?usp=sharing