SlideShare a Scribd company logo
Appium 2in1
Mobile tests cocktail recipe
Who?
Yaroslav
Pernerovskyy
 Test Automation Lead in
Global Logic
 Trainer in QA Factory
y.pernerovskyy
ypernerovskyy@qafactory.com.ua
www.linkedin.com/pub/yaroslav-pernerovsky/1/9b5/55
What?
Why?
 Web application
 Selenium based test framework (Java)
 iOS and Android clients
 Reuse framework features for mobile
 Open Source (Free of charge)
 Easy setup and configuration
 Scalable and flexible
Appium Rules
 Test the same app you submit to the
marketplace
 Write your tests in any language, using any
framework
 Use a standard automation specification and
API
 Build a large and thriving open-source
community effort
http://appium.io/slate/en/master/?ruby#appium-philosophy
iOS
Android
Firefox OS
Test Script
JSON Wire
protocol
How it works
Native
automation
instruments
Remote Web
Driver
node.js
UiAutomator
Selendroid
Instruments
Marionette
 Native automation instruments
Android: UiAutomator (4.2), Selendroid (2.3)
iOS: UIAutomation
Firefox OS: Marionette
 Emulators/simulators and real devices
 Web Driver API
 Selenium Grid
 Ruby, Python, Java, JavaScript, PHP, C#...
 Documentation
 http://appium.io/
Features
Install
 npm install -g appium
 Appium.dmg
 Appium.exe
 https://bitbucket.org/appium/appium.app/downloads/
Appium GUI
Command line
appium -a 192.168.10.11 -p 4723
--device-name "iPad Simulator" --force-ipad
--orientation LANDSCAPE --pre-launch
--app /products/testapp.app
--nodeconfig /appium/nodeconfig.json
nodeconfig.json
Issues
 Stability issues
 Actions depends on platform
 Problems with accessing some elements
 iOS specific issues
Single app test
Hardware keys support
One emulator instance
xpath issue
Application types
Mobile Browser
Device APIs
Native App
0101010101
0101010101
0101010001
0011110101
0010011100
1010000001
<html>
<body>
<input type="button"
value=" + "
onclick="plus()">
<script
language="JavaScrip
t">
unction plus()
{
rezultat.value=znah_
1.value-(-
1)*znah_2.value;
}
</body>
</html>
Device APIs
Native Container
<html>
<body>
<input type="button"
value=" + "
onclick="plus()">
<script
language="JavaScrip
t">
unction plus()
{
rezultat.value=znah_
1.value
Web apps
 Similar layouts
 Same locators
 Absolutely the same tests can be executed
 Not require additional efforts
Native apps
 Different layout
 Different locators
 Platform specific UI elements
 Test cases should be specially designed
 Require additional efforts
Test environment
SVN
Jenkins
Web Firefox
Web Chrome
Mobile iOS
Mobile Android
……
Selenium
Grid
Chrome, FF
IE
Safari
adb
iPad simulator
iPhone simulator
Nexus 7
Nexus 5
Appiumreports
Selenium
Test framework overview
class Drivers
class Bindings
Page Objects
Page Objects
Page Objects
Page Objects
Tests
Tests
Tests
Tests
Global Configuration
Test data
loggers/db tools/service tools
etc.
Tests
 Test steps should be similar for both platforms
@Test (dataProvider = "Logins")
public void verify_Incorrect_Login(Map<String, String> testData){
loginScreen.verifyScreenLoaded();
loginScreen.submitLogin(testData.get("User"),testData.get("Password"));
loginScreen.verifyAndCloseErrorMessage(testData.get("Message"));
loginScreen.verifyScreenLoaded();
}
Page Objects
 Do not hardcode locators in Page objects
 Store it in external object
 Implement platform specific code
 Create bindings for platform specific actions
Page Object
public class LoginScreen extends Bindings {
public LoginScreen(Instance instance) {
super(instance);
initLocators();
}
private static String LoginScreenUserField;
private static String LoginScreenPasswordField;
private static String LoginScreenSubmitLoginBtn;
private static String LoginScreenErrorMsg;
private static String LoginScreenErrorMsgCloseBtn;
private void initLocators() {
LoginScreenUserField = locators.get("LoginScreenUserField");
LoginScreenPasswordField = locators.get("LoginScreenPasswordField");
LoginScreenSubmitLoginButton = locators.get("LoginScreenSubmitLoginButton");
LoginScreenErrorMsg = locators.get("LoginScreenErrorMsg");
LoginScreenErrorMsgCloseBtn = locators.get("LoginScreenErrorMsgCloseBtn");
}
...
...
Page Object
public void submitLogin(String login, String pass) {
typeKeys(LoginScreenUserField, login);
typeKeys(LoginScreenPasswordField, pass);
tap(LoginScreenSubmitLoginBtn);
}
public void verifyAndCloseErrorMessage(String Message) {
verifyElementPresent(LoginScreenErrorMsg);
assetEqual(getText(LoginScreenErrorMsg),Message);
if (instance.getPlatform().equals("ios"))
tap(LoginScreenErrorMsgCloseBtn);
else
clickBackBtn();
}
Locators
<?xml version='1.0' encoding='UTF-8'?>
<dataset>
<LOCATORNAME="LoginScreenUserField"
ANDROID="id=com.example.myapp:id/txtUser"
IOS="xpath=//window[1]/textfield[1]"/>
<LOCATORNAME="LoginScreenPasswordField"
ANDROID="id=com.example.myapp:id/txtPassword"
IOS="xpath=//window[1]/textfield[2]"/>
<LOCATORNAME="LoginScreenSubmitLoginButton"
ANDROID="name=Login "
IOS="name=Login"/>
<LOCATORNAME="LoginScreenErrorMsg"
ANDROID="id=com.example.myapp:id/errText"
IOS="xpath=//*/UIAPopover[contains(@name,'ErrorText')]"/>
<LOCATORNAME="LoginScreenErrorMsgCloseBtn"
IOS="name=Ok"/>
...
...
Get locators for Android
Get locators for iOS
Summary
 WebDriver concept
 Cross platform
 Open Source
 Easy integration into existed frameworks
 It Works!
 Has issues
 But it works!
 With some additional efforts it is possible to execute
exactly the same tests on different platforms
KEEP
CALM
AND
ASK
QUESTIONS

More Related Content

What's hot (20)

PPT
Using Selenium to Test Native Apps (Wait, you can do that?)
Sauce Labs
 
PPT
Android & iOS Automation Using Appium
Mindfire Solutions
 
PPT
Selenium Concepts
Swati Bansal
 
PPSX
Selenium WebDriver with Java
Fayis-QA
 
PPTX
Selenium web driver
Roman Savitskiy
 
PDF
Selenium Webdriver Interview Questions
Jai Singh
 
PPTX
Selenium WebDriver
Yuriy Bezgachnyuk
 
PDF
Appium Mobile Test Automation like WebDriver
Andrii Dzynia
 
PDF
Web UI test automation instruments
Artem Nagornyi
 
PDF
Selenium web driver
Shobika Ramasubbarayalu
 
PPTX
Automation Testing by Selenium Web Driver
Cuelogic Technologies Pvt. Ltd.
 
PDF
利用 Appium + Robot Framework 實現跨平台 App 互動測試
Jeremy Kao
 
PPT
Appium
Keshav Kashyap
 
PPTX
Selenium
Batch2016
 
PPTX
Mobile automation testing with selenium and appium
BugRaptors
 
PDF
iOS Automation Frameworks evaluation
Serghei Moret
 
PPTX
Automation testing on ios platform using appium
Ambreen Khan
 
PDF
Automation Testing using Selenium
Naresh Chintalcheru
 
PPTX
Selenium Interview Questions and Answers | Selenium Tutorial | Selenium Train...
Edureka!
 
PPTX
Flash Testing with Selenium RC
Damith Liyanaarachchi
 
Using Selenium to Test Native Apps (Wait, you can do that?)
Sauce Labs
 
Android & iOS Automation Using Appium
Mindfire Solutions
 
Selenium Concepts
Swati Bansal
 
Selenium WebDriver with Java
Fayis-QA
 
Selenium web driver
Roman Savitskiy
 
Selenium Webdriver Interview Questions
Jai Singh
 
Selenium WebDriver
Yuriy Bezgachnyuk
 
Appium Mobile Test Automation like WebDriver
Andrii Dzynia
 
Web UI test automation instruments
Artem Nagornyi
 
Selenium web driver
Shobika Ramasubbarayalu
 
Automation Testing by Selenium Web Driver
Cuelogic Technologies Pvt. Ltd.
 
利用 Appium + Robot Framework 實現跨平台 App 互動測試
Jeremy Kao
 
Selenium
Batch2016
 
Mobile automation testing with selenium and appium
BugRaptors
 
iOS Automation Frameworks evaluation
Serghei Moret
 
Automation testing on ios platform using appium
Ambreen Khan
 
Automation Testing using Selenium
Naresh Chintalcheru
 
Selenium Interview Questions and Answers | Selenium Tutorial | Selenium Train...
Edureka!
 
Flash Testing with Selenium RC
Damith Liyanaarachchi
 

Viewers also liked (6)

PPT
Selenium and Cucumber Selenium Conf 2011
dimakovalenko
 
PDF
Mobile automation using selenium cucumber & appium
Selenium Cucumber
 
PDF
QA Fest 2015. Игорь Хрол. Тестировщик в Agile - кто это?
QAFest
 
PDF
Developing a test automation strategy by Brian Bayer
QA or the Highway
 
PDF
Barcamp Bangkhen :: Robot Framework
Somkiat Puisungnoen
 
PDF
Robot Framework Introduction & Sauce Labs Integration
Sauce Labs
 
Selenium and Cucumber Selenium Conf 2011
dimakovalenko
 
Mobile automation using selenium cucumber & appium
Selenium Cucumber
 
QA Fest 2015. Игорь Хрол. Тестировщик в Agile - кто это?
QAFest
 
Developing a test automation strategy by Brian Bayer
QA or the Highway
 
Barcamp Bangkhen :: Robot Framework
Somkiat Puisungnoen
 
Robot Framework Introduction & Sauce Labs Integration
Sauce Labs
 
Ad

Similar to QA Fest 2014. Ярослав Пернеровский. Appium - два в одном. рецепт приготовления коктейля из мобильных автотестов (20)

PPT
Appium
Deepshikha Singh
 
PPT
Selenium
Sun Technlogies
 
PDF
automation framework
ANSHU GOYAL
 
PPT
Test automationslides
UMA MAHESWARI
 
PPTX
#2 integration + ui tests
eleksdev
 
PPTX
Android CI and Appium
Oren Ashkenazy
 
PPTX
Comprehensive List of Open Source QA Tools
Ashish Bansal
 
PPTX
Next level of Appium
Keshav Kashyap
 
PPT
By combining Selenium for frontend testing and tools
sivanandhumanickam84
 
PPTX
Automation - web testing with selenium
Tzirla Rozental
 
PDF
Good practices for debugging Selenium and Appium tests
Abhijeet Vaikar
 
PPTX
Web UI Tests: Introduce UI tests using Selenium
Peyman Fakharian
 
PPTX
Appium solution
Nael Abd Eljawad
 
DOCX
Selenium Testing Training in Bangalore
rajkamal560066
 
PPTX
Selenium training
Suresh Arora
 
PDF
Android UI Testing with Appium
Luke Maung
 
PPT
Selenium
Purna Chandar
 
PPTX
Appium overview
Abhishek Yadav
 
PDF
Java Test Automation for REST, Web and Mobile
Elias Nogueira
 
PDF
Shifting landscape of mobile automation, and the future of Appium - Jonathan ...
Applitools
 
Selenium
Sun Technlogies
 
automation framework
ANSHU GOYAL
 
Test automationslides
UMA MAHESWARI
 
#2 integration + ui tests
eleksdev
 
Android CI and Appium
Oren Ashkenazy
 
Comprehensive List of Open Source QA Tools
Ashish Bansal
 
Next level of Appium
Keshav Kashyap
 
By combining Selenium for frontend testing and tools
sivanandhumanickam84
 
Automation - web testing with selenium
Tzirla Rozental
 
Good practices for debugging Selenium and Appium tests
Abhijeet Vaikar
 
Web UI Tests: Introduce UI tests using Selenium
Peyman Fakharian
 
Appium solution
Nael Abd Eljawad
 
Selenium Testing Training in Bangalore
rajkamal560066
 
Selenium training
Suresh Arora
 
Android UI Testing with Appium
Luke Maung
 
Selenium
Purna Chandar
 
Appium overview
Abhishek Yadav
 
Java Test Automation for REST, Web and Mobile
Elias Nogueira
 
Shifting landscape of mobile automation, and the future of Appium - Jonathan ...
Applitools
 
Ad

More from QAFest (20)

PDF
QA Fest 2019. Сергій Короленко. Топ веб вразливостей за 40 хвилин
QAFest
 
PPTX
QA Fest 2019. Анна Чернышова. Self-healing test automation 2.0. The Future
QAFest
 
PPTX
QA Fest 2019. Doug Sillars. It's just too Slow: Testing Mobile application pe...
QAFest
 
PDF
QA Fest 2019. Катерина Спринсян. Параллельное покрытие автотестами и другие и...
QAFest
 
PDF
QA Fest 2019. Никита Галкин. Как зарабатывать больше
QAFest
 
PDF
QA Fest 2019. Сергей Пирогов. Why everything is spoiled
QAFest
 
PDF
QA Fest 2019. Сергей Новик. Между мотивацией и выгоранием
QAFest
 
PPTX
QA Fest 2019. Владимир Никонов. Код Шредингера или зачем и как мы тестируем н...
QAFest
 
PPTX
QA Fest 2019. Владимир Трандафилов. GUI automation of WEB application with SV...
QAFest
 
PDF
QA Fest 2019. Иван Крутов. Bulletproof Selenium Cluster
QAFest
 
PPTX
QA Fest 2019. Николай Мижигурский. Миссия /*не*/выполнима: гуманитарий собесе...
QAFest
 
PDF
QA Fest 2019. Володимир Стиран. Чим раніше – тим вигідніше, але ніколи не піз...
QAFest
 
PPTX
QA Fest 2019. Дмитрий Прокопук. Mocks and network tricks in UI automation
QAFest
 
PDF
QA Fest 2019. Екатерина Дядечко. Тестирование медицинского софта — вызовы и в...
QAFest
 
PDF
QA Fest 2019. Катерина Черникова. Tune your P’s: the pop-art of keeping testa...
QAFest
 
PDF
QA Fest 2019. Алиса Бойко. Какнезапутаться в коммуникативных сетях IT
QAFest
 
PPTX
QA Fest 2019. Святослав Логин. Как найти уязвимости в мобильном приложении
QAFest
 
PPTX
QA Fest 2019. Катерина Шепелєва та Інна Оснач. Що українцям потрібно знати пр...
QAFest
 
PDF
QA Fest 2019. Антон Серпутько. Нагрузочное тестирование распределенных асинхр...
QAFest
 
PPTX
QA Fest 2019. Петр Тарасенко. QA Hackathon - The Cookbook 22
QAFest
 
QA Fest 2019. Сергій Короленко. Топ веб вразливостей за 40 хвилин
QAFest
 
QA Fest 2019. Анна Чернышова. Self-healing test automation 2.0. The Future
QAFest
 
QA Fest 2019. Doug Sillars. It's just too Slow: Testing Mobile application pe...
QAFest
 
QA Fest 2019. Катерина Спринсян. Параллельное покрытие автотестами и другие и...
QAFest
 
QA Fest 2019. Никита Галкин. Как зарабатывать больше
QAFest
 
QA Fest 2019. Сергей Пирогов. Why everything is spoiled
QAFest
 
QA Fest 2019. Сергей Новик. Между мотивацией и выгоранием
QAFest
 
QA Fest 2019. Владимир Никонов. Код Шредингера или зачем и как мы тестируем н...
QAFest
 
QA Fest 2019. Владимир Трандафилов. GUI automation of WEB application with SV...
QAFest
 
QA Fest 2019. Иван Крутов. Bulletproof Selenium Cluster
QAFest
 
QA Fest 2019. Николай Мижигурский. Миссия /*не*/выполнима: гуманитарий собесе...
QAFest
 
QA Fest 2019. Володимир Стиран. Чим раніше – тим вигідніше, але ніколи не піз...
QAFest
 
QA Fest 2019. Дмитрий Прокопук. Mocks and network tricks in UI automation
QAFest
 
QA Fest 2019. Екатерина Дядечко. Тестирование медицинского софта — вызовы и в...
QAFest
 
QA Fest 2019. Катерина Черникова. Tune your P’s: the pop-art of keeping testa...
QAFest
 
QA Fest 2019. Алиса Бойко. Какнезапутаться в коммуникативных сетях IT
QAFest
 
QA Fest 2019. Святослав Логин. Как найти уязвимости в мобильном приложении
QAFest
 
QA Fest 2019. Катерина Шепелєва та Інна Оснач. Що українцям потрібно знати пр...
QAFest
 
QA Fest 2019. Антон Серпутько. Нагрузочное тестирование распределенных асинхр...
QAFest
 
QA Fest 2019. Петр Тарасенко. QA Hackathon - The Cookbook 22
QAFest
 

Recently uploaded (20)

PDF
The Minister of Tourism, Culture and Creative Arts, Abla Dzifa Gomashie has e...
nservice241
 
PPTX
TOP 10 AI TOOLS YOU MUST LEARN TO SURVIVE IN 2025 AND ABOVE
digilearnings.com
 
PDF
BÀI TẬP TEST BỔ TRỢ THEO TỪNG CHỦ ĐỀ CỦA TỪNG UNIT KÈM BÀI TẬP NGHE - TIẾNG A...
Nguyen Thanh Tu Collection
 
PPTX
How to Close Subscription in Odoo 18 - Odoo Slides
Celine George
 
PDF
Tips for Writing the Research Title with Examples
Thelma Villaflores
 
PPTX
How to Track Skills & Contracts Using Odoo 18 Employee
Celine George
 
PPTX
Unlock the Power of Cursor AI: MuleSoft Integrations
Veera Pallapu
 
PPTX
Virus sequence retrieval from NCBI database
yamunaK13
 
PPTX
Translation_ Definition, Scope & Historical Development.pptx
DhatriParmar
 
PPTX
Applications of matrices In Real Life_20250724_091307_0000.pptx
gehlotkrish03
 
PPTX
Rules and Regulations of Madhya Pradesh Library Part-I
SantoshKumarKori2
 
PPTX
CONCEPT OF CHILD CARE. pptx
AneetaSharma15
 
PPTX
Gupta Art & Architecture Temple and Sculptures.pptx
Virag Sontakke
 
PPTX
Cleaning Validation Ppt Pharmaceutical validation
Ms. Ashatai Patil
 
PPTX
Continental Accounting in Odoo 18 - Odoo Slides
Celine George
 
PPTX
Top 10 AI Tools, Like ChatGPT. You Must Learn In 2025
Digilearnings
 
PPTX
PROTIEN ENERGY MALNUTRITION: NURSING MANAGEMENT.pptx
PRADEEP ABOTHU
 
PPTX
20250924 Navigating the Future: How to tell the difference between an emergen...
McGuinness Institute
 
PPTX
YSPH VMOC Special Report - Measles Outbreak Southwest US 7-20-2025.pptx
Yale School of Public Health - The Virtual Medical Operations Center (VMOC)
 
PPTX
LDP-2 UNIT 4 Presentation for practical.pptx
abhaypanchal2525
 
The Minister of Tourism, Culture and Creative Arts, Abla Dzifa Gomashie has e...
nservice241
 
TOP 10 AI TOOLS YOU MUST LEARN TO SURVIVE IN 2025 AND ABOVE
digilearnings.com
 
BÀI TẬP TEST BỔ TRỢ THEO TỪNG CHỦ ĐỀ CỦA TỪNG UNIT KÈM BÀI TẬP NGHE - TIẾNG A...
Nguyen Thanh Tu Collection
 
How to Close Subscription in Odoo 18 - Odoo Slides
Celine George
 
Tips for Writing the Research Title with Examples
Thelma Villaflores
 
How to Track Skills & Contracts Using Odoo 18 Employee
Celine George
 
Unlock the Power of Cursor AI: MuleSoft Integrations
Veera Pallapu
 
Virus sequence retrieval from NCBI database
yamunaK13
 
Translation_ Definition, Scope & Historical Development.pptx
DhatriParmar
 
Applications of matrices In Real Life_20250724_091307_0000.pptx
gehlotkrish03
 
Rules and Regulations of Madhya Pradesh Library Part-I
SantoshKumarKori2
 
CONCEPT OF CHILD CARE. pptx
AneetaSharma15
 
Gupta Art & Architecture Temple and Sculptures.pptx
Virag Sontakke
 
Cleaning Validation Ppt Pharmaceutical validation
Ms. Ashatai Patil
 
Continental Accounting in Odoo 18 - Odoo Slides
Celine George
 
Top 10 AI Tools, Like ChatGPT. You Must Learn In 2025
Digilearnings
 
PROTIEN ENERGY MALNUTRITION: NURSING MANAGEMENT.pptx
PRADEEP ABOTHU
 
20250924 Navigating the Future: How to tell the difference between an emergen...
McGuinness Institute
 
YSPH VMOC Special Report - Measles Outbreak Southwest US 7-20-2025.pptx
Yale School of Public Health - The Virtual Medical Operations Center (VMOC)
 
LDP-2 UNIT 4 Presentation for practical.pptx
abhaypanchal2525
 

QA Fest 2014. Ярослав Пернеровский. Appium - два в одном. рецепт приготовления коктейля из мобильных автотестов

  • 1. Appium 2in1 Mobile tests cocktail recipe
  • 2. Who? Yaroslav Pernerovskyy  Test Automation Lead in Global Logic  Trainer in QA Factory y.pernerovskyy [email protected] www.linkedin.com/pub/yaroslav-pernerovsky/1/9b5/55
  • 4. Why?  Web application  Selenium based test framework (Java)  iOS and Android clients  Reuse framework features for mobile  Open Source (Free of charge)  Easy setup and configuration  Scalable and flexible
  • 5. Appium Rules  Test the same app you submit to the marketplace  Write your tests in any language, using any framework  Use a standard automation specification and API  Build a large and thriving open-source community effort http://appium.io/slate/en/master/?ruby#appium-philosophy
  • 6. iOS Android Firefox OS Test Script JSON Wire protocol How it works Native automation instruments Remote Web Driver node.js UiAutomator Selendroid Instruments Marionette
  • 7.  Native automation instruments Android: UiAutomator (4.2), Selendroid (2.3) iOS: UIAutomation Firefox OS: Marionette  Emulators/simulators and real devices  Web Driver API  Selenium Grid  Ruby, Python, Java, JavaScript, PHP, C#...  Documentation  http://appium.io/ Features
  • 8. Install  npm install -g appium  Appium.dmg  Appium.exe  https://bitbucket.org/appium/appium.app/downloads/
  • 10. Command line appium -a 192.168.10.11 -p 4723 --device-name "iPad Simulator" --force-ipad --orientation LANDSCAPE --pre-launch --app /products/testapp.app --nodeconfig /appium/nodeconfig.json
  • 12. Issues  Stability issues  Actions depends on platform  Problems with accessing some elements  iOS specific issues Single app test Hardware keys support One emulator instance xpath issue
  • 13. Application types Mobile Browser Device APIs Native App 0101010101 0101010101 0101010001 0011110101 0010011100 1010000001 <html> <body> <input type="button" value=" + " onclick="plus()"> <script language="JavaScrip t"> unction plus() { rezultat.value=znah_ 1.value-(- 1)*znah_2.value; } </body> </html> Device APIs Native Container <html> <body> <input type="button" value=" + " onclick="plus()"> <script language="JavaScrip t"> unction plus() { rezultat.value=znah_ 1.value
  • 14. Web apps  Similar layouts  Same locators  Absolutely the same tests can be executed  Not require additional efforts
  • 15. Native apps  Different layout  Different locators  Platform specific UI elements  Test cases should be specially designed  Require additional efforts
  • 16. Test environment SVN Jenkins Web Firefox Web Chrome Mobile iOS Mobile Android …… Selenium Grid Chrome, FF IE Safari adb iPad simulator iPhone simulator Nexus 7 Nexus 5 Appiumreports
  • 17. Selenium Test framework overview class Drivers class Bindings Page Objects Page Objects Page Objects Page Objects Tests Tests Tests Tests Global Configuration Test data loggers/db tools/service tools etc.
  • 18. Tests  Test steps should be similar for both platforms @Test (dataProvider = "Logins") public void verify_Incorrect_Login(Map<String, String> testData){ loginScreen.verifyScreenLoaded(); loginScreen.submitLogin(testData.get("User"),testData.get("Password")); loginScreen.verifyAndCloseErrorMessage(testData.get("Message")); loginScreen.verifyScreenLoaded(); }
  • 19. Page Objects  Do not hardcode locators in Page objects  Store it in external object  Implement platform specific code  Create bindings for platform specific actions
  • 20. Page Object public class LoginScreen extends Bindings { public LoginScreen(Instance instance) { super(instance); initLocators(); } private static String LoginScreenUserField; private static String LoginScreenPasswordField; private static String LoginScreenSubmitLoginBtn; private static String LoginScreenErrorMsg; private static String LoginScreenErrorMsgCloseBtn; private void initLocators() { LoginScreenUserField = locators.get("LoginScreenUserField"); LoginScreenPasswordField = locators.get("LoginScreenPasswordField"); LoginScreenSubmitLoginButton = locators.get("LoginScreenSubmitLoginButton"); LoginScreenErrorMsg = locators.get("LoginScreenErrorMsg"); LoginScreenErrorMsgCloseBtn = locators.get("LoginScreenErrorMsgCloseBtn"); } ... ...
  • 21. Page Object public void submitLogin(String login, String pass) { typeKeys(LoginScreenUserField, login); typeKeys(LoginScreenPasswordField, pass); tap(LoginScreenSubmitLoginBtn); } public void verifyAndCloseErrorMessage(String Message) { verifyElementPresent(LoginScreenErrorMsg); assetEqual(getText(LoginScreenErrorMsg),Message); if (instance.getPlatform().equals("ios")) tap(LoginScreenErrorMsgCloseBtn); else clickBackBtn(); }
  • 23. Get locators for Android
  • 25. Summary  WebDriver concept  Cross platform  Open Source  Easy integration into existed frameworks  It Works!  Has issues  But it works!  With some additional efforts it is possible to execute exactly the same tests on different platforms

Editor's Notes

  • #5: 1 year with appium Issues add Add slide real and emulators and limitations. Appium + hardware controls
  • #13: Hardware keys iOS only one etc
  • #16: (grid/tablewiew etc.)