SlideShare uma empresa Scribd logo
1 de 11
§
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?

Mais conteúdo relacionado

Mais procurados

Appium workshop technopark trivandrum
Appium workshop technopark trivandrumAppium workshop technopark trivandrum
Appium workshop technopark trivandrumSyam 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 ToGlobalLogic Ukraine
 
Appium basics
Appium basicsAppium basics
Appium basicsSyam Sasi
 
Introduction To Appium With Robotframework
Introduction To Appium With RobotframeworkIntroduction To Appium With Robotframework
Introduction To Appium With RobotframeworkSyam Sasi
 
Appium Interview Questions and Answers | Edureka
Appium Interview Questions and Answers | EdurekaAppium Interview Questions and Answers | Edureka
Appium Interview Questions and Answers | EdurekaEdureka!
 
Android UI Testing with Appium
Android UI Testing with AppiumAndroid UI Testing with Appium
Android UI Testing with AppiumLuke Maung
 
Mobile Test Automation - Appium
Mobile Test Automation - AppiumMobile Test Automation - Appium
Mobile Test Automation - AppiumMaria 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 appiumBugRaptors
 
Mobile Automation with Appium
Mobile Automation with AppiumMobile Automation with Appium
Mobile Automation with AppiumManoj Kumar Kumar
 
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 & AppiumSauce Labs
 
Appium troubleshooting
Appium troubleshootingAppium troubleshooting
Appium troubleshootingadi 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 NowSauce Labs
 
Appium: Mobile Automation Made Awesome
Appium: Mobile Automation Made AwesomeAppium: Mobile Automation Made Awesome
Appium: Mobile Automation Made AwesomeNetcetera
 
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 LippsPerfecto by Perforce
 

Mais procurados (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
 

Semelhante a 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 ToolsAmazon 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
 
Appium Overview - by Daniel Puterman
Appium Overview - by Daniel PutermanAppium Overview - by Daniel Puterman
Appium Overview - by Daniel PutermanApplitools
 
Automation using Javascript
Automation using JavascriptAutomation using Javascript
Automation using Javascriptkhanhdang1214
 
Building High Quality Android Applications
Building High Quality Android ApplicationsBuilding High Quality Android Applications
Building High Quality Android ApplicationsLeif Janzik
 
Selenium Camp 2016 - Kiev, Ukraine
Selenium Camp 2016 -  Kiev, UkraineSelenium Camp 2016 -  Kiev, Ukraine
Selenium Camp 2016 - Kiev, UkraineJustin Ison
 
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 - TorontoAmazon 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 DeliveryMikhail 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 DockerMoataz 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 & DebuggingIvano Malavolta
 
Django simplified : by weever mbakaya
Django simplified : by weever mbakayaDjango simplified : by weever mbakaya
Django simplified : by weever mbakayaMbakaya Kwatukha
 
NCDevCon 2017 - Cross Platform Mobile Apps
NCDevCon 2017 - Cross Platform Mobile AppsNCDevCon 2017 - Cross Platform Mobile Apps
NCDevCon 2017 - Cross Platform Mobile AppsJohn 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 ToolsAmazon Web Services
 
Android Application Development Using Java
Android Application Development Using JavaAndroid Application Development Using Java
Android Application Development Using Javaamaankhan
 

Semelhante a 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
 

Último

Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...Steffen Staab
 
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...ICS
 
Unlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language ModelsUnlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language Modelsaagamshah0812
 
Unveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time ApplicationsUnveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time ApplicationsAlberto González Trastoy
 
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdfLearn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdfkalichargn70th171
 
AI & Machine Learning Presentation Template
AI & Machine Learning Presentation TemplateAI & Machine Learning Presentation Template
AI & Machine Learning Presentation TemplatePresentation.STUDIO
 
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️Delhi Call girls
 
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️Delhi Call girls
 
How to Choose the Right Laravel Development Partner in New York City_compress...
How to Choose the Right Laravel Development Partner in New York City_compress...How to Choose the Right Laravel Development Partner in New York City_compress...
How to Choose the Right Laravel Development Partner in New York City_compress...software pro Development
 
AI Mastery 201: Elevating Your Workflow with Advanced LLM Techniques
AI Mastery 201: Elevating Your Workflow with Advanced LLM TechniquesAI Mastery 201: Elevating Your Workflow with Advanced LLM Techniques
AI Mastery 201: Elevating Your Workflow with Advanced LLM TechniquesVictorSzoltysek
 
How To Use Server-Side Rendering with Nuxt.js
How To Use Server-Side Rendering with Nuxt.jsHow To Use Server-Side Rendering with Nuxt.js
How To Use Server-Side Rendering with Nuxt.jsAndolasoft Inc
 
introduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdf
introduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdfintroduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdf
introduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdfVishalKumarJha10
 
Exploring the Best Video Editing App.pdf
Exploring the Best Video Editing App.pdfExploring the Best Video Editing App.pdf
Exploring the Best Video Editing App.pdfproinshot.com
 
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...Health
 
Direct Style Effect Systems - The Print[A] Example - A Comprehension Aid
Direct Style Effect Systems -The Print[A] Example- A Comprehension AidDirect Style Effect Systems -The Print[A] Example- A Comprehension Aid
Direct Style Effect Systems - The Print[A] Example - A Comprehension AidPhilip Schwarz
 
Define the academic and professional writing..pdf
Define the academic and professional writing..pdfDefine the academic and professional writing..pdf
Define the academic and professional writing..pdfPearlKirahMaeRagusta1
 
5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdf5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdfWave PLM
 
How To Troubleshoot Collaboration Apps for the Modern Connected Worker
How To Troubleshoot Collaboration Apps for the Modern Connected WorkerHow To Troubleshoot Collaboration Apps for the Modern Connected Worker
How To Troubleshoot Collaboration Apps for the Modern Connected WorkerThousandEyes
 

Último (20)

Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
 
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
 
Unlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language ModelsUnlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language Models
 
Unveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time ApplicationsUnveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
 
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdfLearn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
 
AI & Machine Learning Presentation Template
AI & Machine Learning Presentation TemplateAI & Machine Learning Presentation Template
AI & Machine Learning Presentation Template
 
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
 
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
 
How to Choose the Right Laravel Development Partner in New York City_compress...
How to Choose the Right Laravel Development Partner in New York City_compress...How to Choose the Right Laravel Development Partner in New York City_compress...
How to Choose the Right Laravel Development Partner in New York City_compress...
 
AI Mastery 201: Elevating Your Workflow with Advanced LLM Techniques
AI Mastery 201: Elevating Your Workflow with Advanced LLM TechniquesAI Mastery 201: Elevating Your Workflow with Advanced LLM Techniques
AI Mastery 201: Elevating Your Workflow with Advanced LLM Techniques
 
Microsoft AI Transformation Partner Playbook.pdf
Microsoft AI Transformation Partner Playbook.pdfMicrosoft AI Transformation Partner Playbook.pdf
Microsoft AI Transformation Partner Playbook.pdf
 
How To Use Server-Side Rendering with Nuxt.js
How To Use Server-Side Rendering with Nuxt.jsHow To Use Server-Side Rendering with Nuxt.js
How To Use Server-Side Rendering with Nuxt.js
 
introduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdf
introduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdfintroduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdf
introduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdf
 
Exploring the Best Video Editing App.pdf
Exploring the Best Video Editing App.pdfExploring the Best Video Editing App.pdf
Exploring the Best Video Editing App.pdf
 
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
 
Direct Style Effect Systems - The Print[A] Example - A Comprehension Aid
Direct Style Effect Systems -The Print[A] Example- A Comprehension AidDirect Style Effect Systems -The Print[A] Example- A Comprehension Aid
Direct Style Effect Systems - The Print[A] Example - A Comprehension Aid
 
Vip Call Girls Noida ➡️ Delhi ➡️ 9999965857 No Advance 24HRS Live
Vip Call Girls Noida ➡️ Delhi ➡️ 9999965857 No Advance 24HRS LiveVip Call Girls Noida ➡️ Delhi ➡️ 9999965857 No Advance 24HRS Live
Vip Call Girls Noida ➡️ Delhi ➡️ 9999965857 No Advance 24HRS Live
 
Define the academic and professional writing..pdf
Define the academic and professional writing..pdfDefine the academic and professional writing..pdf
Define the academic and professional writing..pdf
 
5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdf5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdf
 
How To Troubleshoot Collaboration Apps for the Modern Connected Worker
How To Troubleshoot Collaboration Apps for the Modern Connected WorkerHow To Troubleshoot Collaboration Apps for the Modern Connected Worker
How To Troubleshoot Collaboration Apps for the Modern Connected Worker
 

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

Notas do Editor

  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