SlideShare a Scribd company logo
Gil Sheps
It’s your time to ask
questions
Agenda
Appium server capabilities/ server flags
Real device vs. Emulators
Local server vs. Third party
Test two different apps in the same test
Test native app and browser in one test
Appium server flags
 --session-overide
 --log-level
 --nodeconfig
 --avd
 --show-ios-log
https://github.com/appium/appium/blob/master/docs/en/writing-running-appium/server-args.md
Appium server capabilities
final DesiredCapabilities capabilities = new DesiredCapabilities();
final File appDir = new File(File.separator + "mnt" + File.separator + "InnerActive" +
File.separator + "DeviceConfig" + File.separator);
final File app = new File(appDir, "6.3.0.apk");
capabilities.setCapability("deviceName", "Android");
capabilities.setCapability("deviceType", "phone");
capabilities.setCapability("platformName", "Android");
capabilities.setCapability("platformVersion", "5.1");
capabilities.setCapability("app", app.getAbsolutePath());
capabilities.setCapability("appPackage","com.example.mymeetupexapmple");
capabilities.setCapability("appActivity", ".MainActivity");
capabilities.setCapability("noReset", true);
capabilities.setCapability("fullReset", false);
https://github.com/appium/appium/blob/master/docs/en/writing-running-appium/caps.md
Real device vs. Emulators
Local server vs. Third Party
?
Test hybrid app and browser
@Test
public void testNativeAndBrowser() {
WebDriverWait uiWait = new WebDriverWait(driver, 180);
driver.findElement(By.id("btn")).click();
uiWait.until(ExpectedConditions.presenceOfElementLocated(By.id("txt")));
((AndroidDriver) driver).pressKeyCode(AndroidKeyCode.HOME);
waitFor3Sec();
driver.findElement(By.id("Apps")).click();
driver.findElement(By.id("Browser")).click();
waitFor3Sec();
List<WebElement> elements = driver.findElements(By.className("android.widget.EditText"));
elements.get(0).sendKeys("https://www.meetup.com/Appium-Israel/events/233798589/");
((AndroidDriver) driver).pressKeyCode(AndroidKeyCode.ENTER);
uiWait.until(ExpectedConditions.presenceOfElementLocated(By.id("Download")));
waitFor3Sec();
((AndroidDriver) driver).pressKeyCode(AndroidKeyCode.KEYCODE_APP_SWITCH);
uiWait.until(ExpectedConditions.presenceOfElementLocated(By.xpath("//android.widget.TextView[@text='CI
Sample']")));
driver.findElement(By.xpath("//android.widget.TextView[@text='MyMeetupExpample']")).click();
uiWait.until(ExpectedConditions.visibilityOfElementLocated(By.id("txt")));
}
Test two apps
@Test
public void testSecondApp() {
WebDriverWait uiWait = new WebDriverWait(driver, 180);
driver.findElement(By.id("btn")).click();
uiWait.until(ExpectedConditions.presenceOfElementLocated(By.id("txt")));
((AndroidDriver)driver).startActivity("com.mtvn.mtvPrimeAndroid","com.vmn.android.me.MainActivity");
uiWait.until(ExpectedConditions.visibilityOfElementLocated(By.id("com.mtvn.mtvPrimeAndroid:id/menu_sea
rch")));
driver.findElement(By.id("com.mtvn.mtvPrimeAndroid:id/menu_search")).click();
driver.findElement(By.id("com.mtvn.mtvPrimeAndroid:id/search_query")).sendKeys("hello");
waitFor3Sec();
((AndroidDriver)driver).pressKeyCode(AndroidKeyCode.KEYCODE_APP_SWITCH);
uiWait.until(ExpectedConditions.presenceOfElementLocated(By.xpath("//android.widget.TextView[@text='CI
Sample']")));
driver.findElement(By.xpath("//android.widget.TextView[@text='MyMeetupExpample']")).click();
uiWait.until(ExpectedConditions.visibilityOfElementLocated(By.id("txt")));
}
Test hybrid app and calculator
@Test
public void calculateTwoNumbers() {
if (driver.findElement(By.id("btn")).isDisplayed()) {
waitFor3Sec();
((AndroidDriver) driver).pressKeyCode(AndroidKeyCode.HOME);
driver.findElement(By.id("Apps")).click();
driver.findElement(By.id("Calculator")).click();
waitFor3Sec();
driver.findElement(By.xpath("//android.widget.Button[@text='3']")).click();
driver.findElement(By.id("plus")).click();
driver.findElement(By.xpath("//android.widget.Button[@text='2']")).click();
driver.findElement(By.id("equals")).click();
waitFor3Sec();
Assert.assertTrue(driver.findElement(By.xpath("//android.widget.EditText[@text='5']")).isDis
played());
}
}
It’s your time to ask questions
It’s your time to ask questions
THANK YOU
GIL SHEPS
Automation Developer
Gils@inner-active.com
https://www.linkedin.com/in/gil-sheps

More Related Content

ODP
Appium troubleshooting
PPTX
Android CI and Appium
PDF
Appium understanding document
PPTX
Automation testing on ios platform using appium
PDF
Appium: Mobile Automation Made Awesome
PDF
Appium workshop technopark trivandrum
PDF
How React Native, Appium and me made each other shine @ContinuousDeliveryAmst...
PPTX
Setting Apple's UI Automation Free with Appium
Appium troubleshooting
Android CI and Appium
Appium understanding document
Automation testing on ios platform using appium
Appium: Mobile Automation Made Awesome
Appium workshop technopark trivandrum
How React Native, Appium and me made each other shine @ContinuousDeliveryAmst...
Setting Apple's UI Automation Free with Appium

What's hot (20)

PDF
Chrome Devtools Protocol via Selenium/Appium (English)
PPT
Flex automation. tools comparison
PPTX
Appium Meetup #2 - Mobile Web Automation Introduction
PPT
The Future of Selenium Testing for Mobile Web and Native Apps
PDF
Appium basics
PDF
Forge UI: A New Way to Customize the Atlassian User Experience
PDF
Meet the Forge Runtime
PPTX
Selenium webcrawler
PDF
Vietnam qa meetup
PPTX
Mobile Automation with Appium
PPT
Elefrant [ng-Poznan]
PPTX
Tech Talk #5 : Android Automation Test with Espresso - Trần Văn Toàn
PDF
Elixir Deployment Tools
PPTX
Игорь Фесенко "Web Apps Performance & JavaScript Compilers"
ODP
Pyramid deployment
PDF
End to-end testing from rookie to pro
PDF
Getting started with appium
PPT
The Emergence of Choice in the .NET Ecosystem
PDF
Cross-browser testing in the real world
PPTX
Intro to Silex
Chrome Devtools Protocol via Selenium/Appium (English)
Flex automation. tools comparison
Appium Meetup #2 - Mobile Web Automation Introduction
The Future of Selenium Testing for Mobile Web and Native Apps
Appium basics
Forge UI: A New Way to Customize the Atlassian User Experience
Meet the Forge Runtime
Selenium webcrawler
Vietnam qa meetup
Mobile Automation with Appium
Elefrant [ng-Poznan]
Tech Talk #5 : Android Automation Test with Espresso - Trần Văn Toàn
Elixir Deployment Tools
Игорь Фесенко "Web Apps Performance & JavaScript Compilers"
Pyramid deployment
End to-end testing from rookie to pro
Getting started with appium
The Emergence of Choice in the .NET Ecosystem
Cross-browser testing in the real world
Intro to Silex
Ad

Viewers also liked (17)

PPTX
Behavioral Dynamics from the SERP’s Perspective: What are Failed SERPs and Ho...
PPT
Comercio exterior 1
PPTX
The Intersection of Social Media and Direct
PDF
Google Anforderungen 2016 an die lokale Suche - Patrick Hünemohr im Rahmen de...
PPTX
Optimiza tu canal de youtube
PPT
Collaboration Sites
PPT
Lesson1
PPTX
Parallel testing with appium
PDF
Final Year Project (Tesi)_GFRP_Francesco Di Paolo
PPT
Lecture: Modeling intracellular cargo transport by several molecular motors
PPT
Executive Resume of the Food Sector Business Profile (2007)
PDF
Content Marketing
PPTX
Docker - A high level introduction to dockers and containers
PDF
Building the Next Generation ISAC-- A Blueprint for Success
PDF
The Enterprise Integrator - C4ISR
PPTX
Frotis y cultivo de secrecion vaginal
PDF
Booz Allen Industrial Cybersecurity Threat Briefing
Behavioral Dynamics from the SERP’s Perspective: What are Failed SERPs and Ho...
Comercio exterior 1
The Intersection of Social Media and Direct
Google Anforderungen 2016 an die lokale Suche - Patrick Hünemohr im Rahmen de...
Optimiza tu canal de youtube
Collaboration Sites
Lesson1
Parallel testing with appium
Final Year Project (Tesi)_GFRP_Francesco Di Paolo
Lecture: Modeling intracellular cargo transport by several molecular motors
Executive Resume of the Food Sector Business Profile (2007)
Content Marketing
Docker - A high level introduction to dockers and containers
Building the Next Generation ISAC-- A Blueprint for Success
The Enterprise Integrator - C4ISR
Frotis y cultivo de secrecion vaginal
Booz Allen Industrial Cybersecurity Threat Briefing
Ad

Similar to It’s your time to ask questions (20)

PDF
Appium Automation Testing Tutorial PDF: Learn Mobile Testing in 7 Days
PPT
Android & iOS Automation Using Appium
PPT
PDF
20150319 testotipsio
PPTX
How to Leverage Appium in Your Mobile App Testing
PDF
Continuous mobile automation with Appium in Real Device Cloud
PDF
A Comprehensive Appium Guide for Hybrid App Automation Testing.pdf
PDF
How to Test Android and iOS Mobile Apps with Appium.pdf
PPTX
Parallel Test Runs with Appium on Real Mobile Devices – Hands-on Webinar
PPTX
Mobile automation using Appium
PPTX
Appium.pptx
PPTX
appiumpresent-211128171811.pptx projet de presentation
PDF
Top 15 Appium Interview Questions and Answers in 2023.pdf
PDF
Complete Appium Inspector Tutorial For Testing Mobile Apps .pdf
PPTX
Appium Presentation
PDF
Selenium Camp 2016 - Kiev, Ukraine
PDF
The Present and Future of Mobile Test Automation with Appium
PPTX
Appium Overview - by Daniel Puterman
PPTX
The wild wild west of Selenium Capabilities
PPTX
Appium testing api
Appium Automation Testing Tutorial PDF: Learn Mobile Testing in 7 Days
Android & iOS Automation Using Appium
20150319 testotipsio
How to Leverage Appium in Your Mobile App Testing
Continuous mobile automation with Appium in Real Device Cloud
A Comprehensive Appium Guide for Hybrid App Automation Testing.pdf
How to Test Android and iOS Mobile Apps with Appium.pdf
Parallel Test Runs with Appium on Real Mobile Devices – Hands-on Webinar
Mobile automation using Appium
Appium.pptx
appiumpresent-211128171811.pptx projet de presentation
Top 15 Appium Interview Questions and Answers in 2023.pdf
Complete Appium Inspector Tutorial For Testing Mobile Apps .pdf
Appium Presentation
Selenium Camp 2016 - Kiev, Ukraine
The Present and Future of Mobile Test Automation with Appium
Appium Overview - by Daniel Puterman
The wild wild west of Selenium Capabilities
Appium testing api

Recently uploaded (20)

PDF
medical staffing services at VALiNTRY
PPTX
CHAPTER 2 - PM Management and IT Context
PDF
Internet Downloader Manager (IDM) Crack 6.42 Build 42 Updates Latest 2025
PDF
Digital Systems & Binary Numbers (comprehensive )
PDF
Odoo Companies in India – Driving Business Transformation.pdf
PPTX
Why Generative AI is the Future of Content, Code & Creativity?
PDF
Design an Analysis of Algorithms II-SECS-1021-03
PPTX
Oracle E-Business Suite: A Comprehensive Guide for Modern Enterprises
PDF
Understanding Forklifts - TECH EHS Solution
PDF
System and Network Administraation Chapter 3
PPTX
Introduction to Artificial Intelligence
PDF
T3DD25 TYPO3 Content Blocks - Deep Dive by André Kraus
PDF
EN-Survey-Report-SAP-LeanIX-EA-Insights-2025.pdf
PPTX
Operating system designcfffgfgggggggvggggggggg
PPTX
Computer Software and OS of computer science of grade 11.pptx
PPTX
assetexplorer- product-overview - presentation
PDF
Digital Strategies for Manufacturing Companies
PDF
How to Choose the Right IT Partner for Your Business in Malaysia
PDF
System and Network Administration Chapter 2
PDF
wealthsignaloriginal-com-DS-text-... (1).pdf
medical staffing services at VALiNTRY
CHAPTER 2 - PM Management and IT Context
Internet Downloader Manager (IDM) Crack 6.42 Build 42 Updates Latest 2025
Digital Systems & Binary Numbers (comprehensive )
Odoo Companies in India – Driving Business Transformation.pdf
Why Generative AI is the Future of Content, Code & Creativity?
Design an Analysis of Algorithms II-SECS-1021-03
Oracle E-Business Suite: A Comprehensive Guide for Modern Enterprises
Understanding Forklifts - TECH EHS Solution
System and Network Administraation Chapter 3
Introduction to Artificial Intelligence
T3DD25 TYPO3 Content Blocks - Deep Dive by André Kraus
EN-Survey-Report-SAP-LeanIX-EA-Insights-2025.pdf
Operating system designcfffgfgggggggvggggggggg
Computer Software and OS of computer science of grade 11.pptx
assetexplorer- product-overview - presentation
Digital Strategies for Manufacturing Companies
How to Choose the Right IT Partner for Your Business in Malaysia
System and Network Administration Chapter 2
wealthsignaloriginal-com-DS-text-... (1).pdf

It’s your time to ask questions

  • 1. Gil Sheps It’s your time to ask questions
  • 2. Agenda Appium server capabilities/ server flags Real device vs. Emulators Local server vs. Third party Test two different apps in the same test Test native app and browser in one test
  • 3. Appium server flags  --session-overide  --log-level  --nodeconfig  --avd  --show-ios-log https://github.com/appium/appium/blob/master/docs/en/writing-running-appium/server-args.md
  • 4. Appium server capabilities final DesiredCapabilities capabilities = new DesiredCapabilities(); final File appDir = new File(File.separator + "mnt" + File.separator + "InnerActive" + File.separator + "DeviceConfig" + File.separator); final File app = new File(appDir, "6.3.0.apk"); capabilities.setCapability("deviceName", "Android"); capabilities.setCapability("deviceType", "phone"); capabilities.setCapability("platformName", "Android"); capabilities.setCapability("platformVersion", "5.1"); capabilities.setCapability("app", app.getAbsolutePath()); capabilities.setCapability("appPackage","com.example.mymeetupexapmple"); capabilities.setCapability("appActivity", ".MainActivity"); capabilities.setCapability("noReset", true); capabilities.setCapability("fullReset", false); https://github.com/appium/appium/blob/master/docs/en/writing-running-appium/caps.md
  • 5. Real device vs. Emulators Local server vs. Third Party ?
  • 6. Test hybrid app and browser @Test public void testNativeAndBrowser() { WebDriverWait uiWait = new WebDriverWait(driver, 180); driver.findElement(By.id("btn")).click(); uiWait.until(ExpectedConditions.presenceOfElementLocated(By.id("txt"))); ((AndroidDriver) driver).pressKeyCode(AndroidKeyCode.HOME); waitFor3Sec(); driver.findElement(By.id("Apps")).click(); driver.findElement(By.id("Browser")).click(); waitFor3Sec(); List<WebElement> elements = driver.findElements(By.className("android.widget.EditText")); elements.get(0).sendKeys("https://www.meetup.com/Appium-Israel/events/233798589/"); ((AndroidDriver) driver).pressKeyCode(AndroidKeyCode.ENTER); uiWait.until(ExpectedConditions.presenceOfElementLocated(By.id("Download"))); waitFor3Sec(); ((AndroidDriver) driver).pressKeyCode(AndroidKeyCode.KEYCODE_APP_SWITCH); uiWait.until(ExpectedConditions.presenceOfElementLocated(By.xpath("//android.widget.TextView[@text='CI Sample']"))); driver.findElement(By.xpath("//android.widget.TextView[@text='MyMeetupExpample']")).click(); uiWait.until(ExpectedConditions.visibilityOfElementLocated(By.id("txt"))); }
  • 7. Test two apps @Test public void testSecondApp() { WebDriverWait uiWait = new WebDriverWait(driver, 180); driver.findElement(By.id("btn")).click(); uiWait.until(ExpectedConditions.presenceOfElementLocated(By.id("txt"))); ((AndroidDriver)driver).startActivity("com.mtvn.mtvPrimeAndroid","com.vmn.android.me.MainActivity"); uiWait.until(ExpectedConditions.visibilityOfElementLocated(By.id("com.mtvn.mtvPrimeAndroid:id/menu_sea rch"))); driver.findElement(By.id("com.mtvn.mtvPrimeAndroid:id/menu_search")).click(); driver.findElement(By.id("com.mtvn.mtvPrimeAndroid:id/search_query")).sendKeys("hello"); waitFor3Sec(); ((AndroidDriver)driver).pressKeyCode(AndroidKeyCode.KEYCODE_APP_SWITCH); uiWait.until(ExpectedConditions.presenceOfElementLocated(By.xpath("//android.widget.TextView[@text='CI Sample']"))); driver.findElement(By.xpath("//android.widget.TextView[@text='MyMeetupExpample']")).click(); uiWait.until(ExpectedConditions.visibilityOfElementLocated(By.id("txt"))); }
  • 8. Test hybrid app and calculator @Test public void calculateTwoNumbers() { if (driver.findElement(By.id("btn")).isDisplayed()) { waitFor3Sec(); ((AndroidDriver) driver).pressKeyCode(AndroidKeyCode.HOME); driver.findElement(By.id("Apps")).click(); driver.findElement(By.id("Calculator")).click(); waitFor3Sec(); driver.findElement(By.xpath("//android.widget.Button[@text='3']")).click(); driver.findElement(By.id("plus")).click(); driver.findElement(By.xpath("//android.widget.Button[@text='2']")).click(); driver.findElement(By.id("equals")).click(); waitFor3Sec(); Assert.assertTrue(driver.findElement(By.xpath("//android.widget.EditText[@text='5']")).isDis played()); } }
  • 11. THANK YOU GIL SHEPS Automation Developer Gils@inner-active.com https://www.linkedin.com/in/gil-sheps