live webinar: mobile testing with appium … ios10...agenda appium architecture for ios version
TRANSCRIPT
LIVE WEBINAR:
MOBILE TESTING WITH APPIUM –
HOW TO MODIFY YOUR TESTS TO RUN ON iOS10?
1
Speakers
Guy Arieli
CTO, Experitest
Tal Brameir
CEO, Experitest
2
Agenda
Appium architecture for iOS version <=9
UIAutomation vs XCUITest
Appium 1.6 functionality drop
Element identification overview
Page Source Difference
Overcome page source – find.js
Overcome page source – driver extension
XPath Performance Considerations
Enterprise Appium
Q&A
5 min
5 min
5 min
10 min
5 min
5 min
5 min
5 min
5min
10 min
3
Appium architecture for iOS version <=9
Test code / logic
HTTP / Json
Any language (Java, C#,
Python...)
WebDriver controller execute
the HTTP requests
Instruments command client
(part of xCode)
node.js
Instruments (endless test)
execute bootstrap.js
UIAutomation
Javascript
WebDriver Script Appium server Device infra
4
Appium architecture for iOS version <=9
Test code / logic
HTTP / Json
Any language (Java, C#,
Python...)
WebDriver controller execute
the HTTP requests
xcodebuild -test
node.js
XCUITest (endless test) execute
using WebDriverAgent app
XCUITest – Debug Server launch
WebDriverAgentRunner communicate
with Test Manager Process
Objective C
WebDriver Script Appium server Device infra
5
UIAutomation (iOS 9 and below) vs XCUITest (iOS 10)
XCUITest (ObjectiveC)
XCUIApplication *app = [[XCUIApplication alloc]
init];
[app.buttons[@"Start"] tap];
XCUITest Advanatages
Better code generation
(when used as a tool)Faster
Can be coded in Objective C or Swift -
add many programming language
capabilities that were not available in
UIAutomation Javascript
Better handling wait for
object
UIAutomation (Javascript)
var target = UIATarget.localTarget();
target.frontMostApp().mainWindows().buttons()["OK"].tap();
6
Appium 1.6 functionality drop
Work in landscape (fixed in 1.6.2)
Geolocation support
Device shake
Device locking
Pinch
autoAcceptAlerts
findElementByIosUIAutomation
execute_script
7
Element identification overviewDescriptionType
The label attribute of the element.Label
The raw value attribute of the elementValue
Direct Path to the elementPath (Appium)
Element X location (in pixels)X
Element Y Location (in pixels)Y
Width of element (in pixels)Width
Height of element (in pixels)Height
Is the element visible on the screenVisible (Appium
The value that is displayed when the element has no value.Hint
Is the element enabled \ disabled modeEnabled
https://developer.apple.com/reference/xctest/xcuielementattributes?language=objc
8
Page Source Difference
9
Element identification overview
DetailsiOS 10iOS 9
Class name (xpath node name)XCUIElementTypeApplicationUIAApplication
Class name (xpath node name)XCUIElementTypeWindowUIAWindow
Add new tag for the viewXCUIElementTypeOther
Class name (xpath node name)XCUIElementTypeScrollViewUIAScrollView
Class name (xpath node name)XCUIElementTypeStaticTextUIAStaticText
Class name (xpath node name)XCUIElementTypeImageUIAImage
Class name (xpath node name)XCUIElementTypeTextFieldUIATextField
Class name (xpath node name)XCUIElementTypeButtonUIAButton
10
Overcome page source – find.js
11
Overcome page source – driver extension
12
Demo
XPath Performance Considerations
driver.findElements(By.xpath("//*"))[0] - >60 Seconds
driver.findElement(By.xpath("//*[0]")) - ~40 Seconds
driver.findElement(By.xpath("//*[@value='OK']")) - ~10 Seconds
driver.findElement(By.xpath("//XCUIElementTypeButton"))) - ~10 Seconds
driver.findElement(By.xpath("//XCUIElementTypeButton[@value=OK']")) –
3 Seconds
13
Enterprise Appium by Experitest
A commercial, enhanced version of the Appium open-source suitable
for large-scale Enterprise deployments
Scales local automation
to an Enterprise-
Wide environment
Adds Remotingcapabilities critical for
offshore teams
Enables Quick & Easy
Set-up and Scripting
Increases
Functionality and
Performance
Offers full,
customizable
Reporting
Provides Device
Application and
User
Management
Immediate
Support for
New Operating
Systems
Enterprise level
support
14
P
Demo
15
Demo
16
Demo
17
Q&A
18
Thank you
19