SlideShare a Scribd company logo
IOS UIAutomation integration


                       François Reynaud
                    freynaud@ebay.com
           github.com/freynaud/ios-driver
Goal
Cut down the time needed for the eBay IOS
native apps regression.

 o build something light
 o reuse as much as possible
 o open source
Instruments
Instruments tests
Integration capabilities
Selenium-isation



             REST API

    client              server

                                 Instruments
REST API
Content management
Content management
{
        "label": "Bien que 8,848 mètres de haut, Montagne 1 aient été montés la première fois
                29 May 1953.",
        "name": "Bien que 8,848 mètres de haut, Montagne 1 aient été montés la première fois
                29 May 1953.",
        "value": "Bien que 8,848 mètres de haut, Montagne 1 aient été montés la première fois
                29 May 1953.",

        "rect": {
                 "origin": {
                               "x": 34,
                               "y": 168
                },
                "size": {
                               "height": 164,
                               "width": 251
                }
        },
        "type": "UIAStaticText",
    }
Content management
Content management

IOSCapabilities cap = IOSCapabilities.ipad("eBay");

cap.setLanguage("fr");

UIADriver driver = new RemoteUIADriver(url, cap);

Criteria c = new NameCriteria("Agree", serverL10N);

UIAElement button = driver.findElement(c);

button.tap();
Inspector
Example
@Test(dataProvider = "ipad")
 public void testIOSAppIPAD(String l) throws Exception {
   IOSCapabilities cap = IOSCapabilities.ipad("eBay");
   cap.setLanguage(l);

    UIADriver driver = new RemoteUIADriver("http://localhost:4444/wd/hub", cap);

    Criteria c1 = new TypeCriteria(UIAButton.class);
    Criteria c2 = new NameCriteria("Agree", L10NStrategy.serverL10N);
    Criteria c = new AndCriteria(c1, c2);

    UIAElement button = driver.findElement(c);
    button.tap();

    driver.setDeviceOrientation(UIA_DEVICE_ORIENTATION_PORTRAIT);

    Criteria ui = new TypeCriteria(UIATextField.class);
    Criteria p = new TypeCriteria(UIASecureTextField.class);

    UIATextField userId = (UIATextField) driver.findElement(ui);
    userId.setValue("francois_uk1");

    UIASecureTextField pwd = (UIASecureTextField) driver.findElement(p);
    pwd.setValue("password");

    driver.takeScreenshot(ss.png);
    Reporter.log("<img src='ss.png'>");

    driver.quit();
}
Demo
Why ?



            REST API

   client              server

                                Instruments
Integrating Selenium grid.
                             server
                                  Instruments




client(s)    Hub             server
                                  Instruments




                             server
                                  Instruments
Demo

More Related Content

PPTX
Infrastructure as Code: Introduction to Terraform
PPTX
Breaking Up With Your Data Center Presentation
PPTX
Basics of Ansible - Sahil Davawala
PDF
Intro to Terraform
KEY
fog or: How I Learned to Stop Worrying and Love the Cloud
PDF
Phoenix for Rails Devs
PDF
Infrastructure as Code with Terraform
PPTX
Building Windows Images with Packer
Infrastructure as Code: Introduction to Terraform
Breaking Up With Your Data Center Presentation
Basics of Ansible - Sahil Davawala
Intro to Terraform
fog or: How I Learned to Stop Worrying and Love the Cloud
Phoenix for Rails Devs
Infrastructure as Code with Terraform
Building Windows Images with Packer

What's hot (20)

PDF
Kube-AWS
PDF
London Hug 19/5 - Terraform in Production
PDF
Virtualize and automate your development environment for fun and profit
PDF
Terraform Introduction
PPTX
Final terraform
PDF
How to test infrastructure code: automated testing for Terraform, Kubernetes,...
PDF
Developing Terraform Modules at Scale - HashiTalks 2021
PPTX
An intro to Docker, Terraform, and Amazon ECS
PPTX
Terraform Abstractions for Safety and Power
PDF
CI/CD with Kubernetes, Helm & Wercker (#madScalability)
PPTX
Transfer to kubernetes data platform from EMR
PPTX
Terraform Modules and Continuous Deployment
PDF
EC2とVarnishで画像配信
PDF
tofu - COOKPAD's image system
PPTX
"Continuously delivering infrastructure using Terraform and Packer" training ...
PPTX
ILM - Pipeline in the cloud
PPTX
Cyansible
PPTX
Terraform at Scale
PDF
Scaling terraform
Kube-AWS
London Hug 19/5 - Terraform in Production
Virtualize and automate your development environment for fun and profit
Terraform Introduction
Final terraform
How to test infrastructure code: automated testing for Terraform, Kubernetes,...
Developing Terraform Modules at Scale - HashiTalks 2021
An intro to Docker, Terraform, and Amazon ECS
Terraform Abstractions for Safety and Power
CI/CD with Kubernetes, Helm & Wercker (#madScalability)
Transfer to kubernetes data platform from EMR
Terraform Modules and Continuous Deployment
EC2とVarnishで画像配信
tofu - COOKPAD's image system
"Continuously delivering infrastructure using Terraform and Packer" training ...
ILM - Pipeline in the cloud
Cyansible
Terraform at Scale
Scaling terraform
Ad

Viewers also liked (19)

PPTX
List building
PPT
PPT
PDF
Tesis sheridan revision final
PDF
Artículos de Arturo Medina en la Revista Ausbanc
DOC
Ensauo final 5
ODP
La població d’ espanya i de catalunya
PPSX
(teoria del pago)
DOC
Anti theftsystemforvechicles1 final
PDF
Participant Guide Selling and Succession
PDF
Participant Guide insurance planning
PPT
Tema 6 La construccion del estado liberal 1833_1868
PPTX
El Medio Natural España y Europa (Tema 2)
PDF
Educación diferencial
PPSX
PRspeak Profile-Lovely Sarkar
PDF
PDF
|AKBAR TRADING EST. SAUDI ARABIA|TE TYCO ELECTRONICS Epp 0317-4 08 solderle...
PPTX
La Población (Tema 3)
List building
Tesis sheridan revision final
Artículos de Arturo Medina en la Revista Ausbanc
Ensauo final 5
La població d’ espanya i de catalunya
(teoria del pago)
Anti theftsystemforvechicles1 final
Participant Guide Selling and Succession
Participant Guide insurance planning
Tema 6 La construccion del estado liberal 1833_1868
El Medio Natural España y Europa (Tema 2)
Educación diferencial
PRspeak Profile-Lovely Sarkar
|AKBAR TRADING EST. SAUDI ARABIA|TE TYCO ELECTRONICS Epp 0317-4 08 solderle...
La Población (Tema 3)
Ad

Similar to Doc (20)

PDF
AWS Elastic Container Service - DockerHN
PDF
EC2 Container Service
PDF
Node Interactive: Node.js Performance and Highly Scalable Micro-Services
PDF
A 60-mn tour of AWS compute (March 2016)
PPTX
Introduction to Amazon EC2 Container Service and setting up build pipeline wi...
PPTX
Automation with Packer and TerraForm
PPTX
Tech connect aws
PDF
IBM Cloud University: Build, Deploy and Scale Node.js Microservices
PDF
AWS Lambda with Serverless Framework and Java
PDF
Immutable AWS Deployments with Packer and Jenkins
PPTX
Amazon Web Services and Docker: from developing to production
ODP
Puppet and Apache CloudStack
PDF
自己修復的なインフラ -Self-Healing Infrastructure-
PDF
Be a microservices hero
KEY
Jclouds Intro
PDF
Infrastructure as Code: Manage your Architecture with Git
PPTX
Introduction to Apache jclouds at NYJavaSIG
PDF
Continuous Deployment in AWS Lambda
PDF
Get you Java application ready for Kubernetes !
PPTX
Journey to the Cloud
AWS Elastic Container Service - DockerHN
EC2 Container Service
Node Interactive: Node.js Performance and Highly Scalable Micro-Services
A 60-mn tour of AWS compute (March 2016)
Introduction to Amazon EC2 Container Service and setting up build pipeline wi...
Automation with Packer and TerraForm
Tech connect aws
IBM Cloud University: Build, Deploy and Scale Node.js Microservices
AWS Lambda with Serverless Framework and Java
Immutable AWS Deployments with Packer and Jenkins
Amazon Web Services and Docker: from developing to production
Puppet and Apache CloudStack
自己修復的なインフラ -Self-Healing Infrastructure-
Be a microservices hero
Jclouds Intro
Infrastructure as Code: Manage your Architecture with Git
Introduction to Apache jclouds at NYJavaSIG
Continuous Deployment in AWS Lambda
Get you Java application ready for Kubernetes !
Journey to the Cloud

Doc

  • 1. IOS UIAutomation integration François Reynaud freynaud@ebay.com github.com/freynaud/ios-driver
  • 2. Goal Cut down the time needed for the eBay IOS native apps regression. o build something light o reuse as much as possible o open source
  • 6. Selenium-isation REST API client server Instruments
  • 9. Content management { "label": "Bien que 8,848 mètres de haut, Montagne 1 aient été montés la première fois 29 May 1953.", "name": "Bien que 8,848 mètres de haut, Montagne 1 aient été montés la première fois 29 May 1953.", "value": "Bien que 8,848 mètres de haut, Montagne 1 aient été montés la première fois 29 May 1953.", "rect": { "origin": { "x": 34, "y": 168 }, "size": { "height": 164, "width": 251 } }, "type": "UIAStaticText", }
  • 11. Content management IOSCapabilities cap = IOSCapabilities.ipad("eBay"); cap.setLanguage("fr"); UIADriver driver = new RemoteUIADriver(url, cap); Criteria c = new NameCriteria("Agree", serverL10N); UIAElement button = driver.findElement(c); button.tap();
  • 13. Example @Test(dataProvider = "ipad") public void testIOSAppIPAD(String l) throws Exception { IOSCapabilities cap = IOSCapabilities.ipad("eBay"); cap.setLanguage(l); UIADriver driver = new RemoteUIADriver("http://localhost:4444/wd/hub", cap); Criteria c1 = new TypeCriteria(UIAButton.class); Criteria c2 = new NameCriteria("Agree", L10NStrategy.serverL10N); Criteria c = new AndCriteria(c1, c2); UIAElement button = driver.findElement(c); button.tap(); driver.setDeviceOrientation(UIA_DEVICE_ORIENTATION_PORTRAIT); Criteria ui = new TypeCriteria(UIATextField.class); Criteria p = new TypeCriteria(UIASecureTextField.class); UIATextField userId = (UIATextField) driver.findElement(ui); userId.setValue("francois_uk1"); UIASecureTextField pwd = (UIASecureTextField) driver.findElement(p); pwd.setValue("password"); driver.takeScreenshot(ss.png); Reporter.log("<img src='ss.png'>"); driver.quit(); }
  • 14. Demo
  • 15. Why ? REST API client server Instruments
  • 16. Integrating Selenium grid. server Instruments client(s) Hub server Instruments server Instruments
  • 17. Demo