SlideShare a Scribd company logo
1 of 16
Interacting with Applications
Agenda
• Interaction with applications
• Automation basics
• Application Types
• Selenium basics
• Application Platforms
Interacting with applications – why
Automation
• In the previous session we showed Perfecto’s basic support
for Manual testing of applications on Perfecto Lab devices.
• One disadvantage of manual testing is the inability to
completely repeat the test.
• Performing the steps exactly in the same order is problematic.
• The timing of the interactions is never the same.
• Automation addresses these problems
• Prepare the full test process in a software platform.
• Execute the test script repetitively – always the same process and
timing.
• May be executed by CI tools – like Jenkins.
• Selenium and Appium are open source testing frameworks for
automation, with support for standard programming
Automation - basics
• Automation tests require interacting with the application through
software commands –
• Clicking on buttons,
• Entering text in text fields,
• Selecting values,
• etc.
• All of these actions require that the automation “script” can
identify the elements that appear on the applications UI.
• There are 2 ways to perform this:
• Using the programmed information of the Application Objects
• Using Visual Analysis to perform the actions on the screen
Both Object manipulation and Visual analysis are supported by Perfecto
Object Interaction
• The input for this method is the XML/HTML provided by the
application.
• We identify the object we want and then select the desired
action:
• Click
• Text Entry
• Swipe
• Etc.
• Object interaction is fast, reliable, & robust.
• Objects are identified by an XPath or similar specification.
• Stay tuned for the XPath unit.
Visual Interaction
• Visual Analysis uses a screenshot taken from the device.
• The screenshot is analyzed
• Using an OCR engine for finding text
• Using a bitmap comparison engine for images.
• This method works directly on what the user sees but is slower
& less reliable.
• Slower – takes time to analyze the screenshot image.
• Less reliable – cannot guarantee 100% match, usually settle for less.
• It is valuable when used sparingly in the correct places in the
test.
• For example, when dismissing system popups or other dynamic
objects.
• Identifying image buttons.
Application Types
• There are 3 types of applications in the market today:
• Web applications – run on a mobile or desktop browser.
• Can be tested on both mobile & desktop.
• Objects are identified with an XPath expression – using DOM objects.
• The Selenium driver is preferred tool to run automation tests.
• Native Mobile Applications
• Installed on a mobile device, (usually) from the app store.
• Separate code base per platform.
• Objects are identified with XPath (with iOS variations) specification
• Appium driver is preferred tool to run automation tests
Application Types
Continued
• Hybrid Applications
• Installed on a mobile device, from the app store
• Characterized by a Web-based interface embedded in a Native
application environment.
• Native environment is separate code base per platform
• Web-based interface is based on HTML specifications.
• Objects are identified with XPath (with iOS variations) specification
• May require switching to different object trees.
• Appium driver is preferred tool to run automation tests
Automation Drivers
• Automation “scripts” connect to the device running the target
application either
• Over a software connection – like a browser running on the
workstation.
• Over a hardware connection – like a USB connection to the
workstation.
• Over a “cloud” connection – using the Perfecto CQ Lab devices.
• Each automation script needs a “connection manager” that
drives the connection to the target device and application.
• Selenium provides drivers for different interactions with Web
Applications.
• RemoteWebDriver class provides support for Perfecto Lab
connections.
• Perfecto also provides a RemoteWebDriverExtended class that
Selenium – Getting Started
• A Selenium “script” starts by creating a RemoteWebDriver
instance.
• Configure the driver instance, using DesiredCapabilities.
• Provide authentication information to connect to Perfecto CQ Lab.
• Provide basic device information
• Provide information on how to reference the script and its environment.
DesiredCapabilities capabilities = new DesiredCapabilities(browserName, string.Empty,
new Platform(PlatformType.Any));
// authentication information
capabilities.SetCapability("user", "[ENTER YOUR USER NAME HERE]");
capabilities.SetCapability("password", "[ENTER YOUR PASSWORD HERE]");
//Provide your device selection criteria
capabilities.SetCapability("platformName", "Android");
// Name your script
capabilities.SetCapability("scriptName", "Test user agent");
// create the instance
var url = new Uri(string.Format("https://{0}/nexperience/perfectomobile/wd/hub", host));
driver = new RemoteWebDriver(url, capabilities);
Capabilities - Authentication
• When driver instance connects to the Perfecto CQ Lab, the
connection is made through the tester’s Perfecto account.
• Need to provide your credentials –
• “user” capability – provides Perfecto account username.
• “password” capability – provides Perfecto account password.
• “securityToken” capability – For Perfecto Lab configured for use of a
Security Token - provides Perfecto account’s valid Security token.
Capabilities – Device
Selection
• In the “Working with Devices” unit we showed how to select a
device for manual testing, using the different device attributes.
• The Selenium driver selects a device to work with, based on the
device attributes that you supply in the capabilities.
• Use capabilities to provide the device selection criteria:
• “platformName” – indicates the device OS (e.g. “Windows”, “iOS”)
• “platformVersion” – indicates the OS version
• “deviceName” – provides Device ID of specific mobile device.
• “model” – provides model name of mobile device (e.g. “iPad”, “Pixel”)
• “browserName” – name of desktop browser to run (e.g. “Chrome”,
“Edge”)
• “resolution” – display resolution for desktop device (e.g. “1024x768”)
• See more information here.
Capabilities – Script
Identification
• Use the “scriptName” capability to provide a name for your
script that will appear both in the execution reporting interface
and the execution manager interface.
• Learn more about the capabilities supported by Perfecto on the
Defining Capabilities page and its child pages.
Object Recognition by
Platform
• XPath is the primary identification method.
• For iOS there are alternatives that are tailored to UI e.g.
accessibility ID & class name.
• In this course, we will begin by explaining XML & XPath and
then dedicate time to iOS objects.
• After understanding object interactions we will study Perfecto’s
Visual Analysis support.
Selenium - FindElements
• To look for an object in your automation script, the Selenium
driver supports different flavors of the FindElement method
(see below)
• For most of our purposes we will use the
FindElementByXPath() method.
Thank You

More Related Content

Similar to CS02A - Interacting with applications.pptx

Native script overview
Native script overviewNative script overview
Native script overviewBaskar rao Dsn
 
Selenium using Java
Selenium using JavaSelenium using Java
Selenium using JavaF K
 
automation framework
automation frameworkautomation framework
automation frameworkANSHU GOYAL
 
Selenium training
Selenium trainingSelenium training
Selenium trainingShivaraj R
 
Automation Testing using Selenium Webdriver
Automation Testing using Selenium WebdriverAutomation Testing using Selenium Webdriver
Automation Testing using Selenium WebdriverPankaj Biswas
 
Automating Mobile Applications
Automating Mobile ApplicationsAutomating Mobile Applications
Automating Mobile ApplicationsApril Luk
 
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
 
Test automation lesson
Test automation lessonTest automation lesson
Test automation lessonSadaaki Emura
 
Cross Platform Appium Tests: How To
Cross Platform Appium Tests: How ToCross Platform Appium Tests: How To
Cross Platform Appium Tests: How ToGlobalLogic Ukraine
 
Selenium Camp 2016 - Kiev, Ukraine
Selenium Camp 2016 -  Kiev, UkraineSelenium Camp 2016 -  Kiev, Ukraine
Selenium Camp 2016 - Kiev, UkraineJustin Ison
 
Selenium
SeleniumSelenium
Seleniumeduquer
 
Slides for Automation Testing or End to End testing
Slides for Automation Testing or End to End testingSlides for Automation Testing or End to End testing
Slides for Automation Testing or End to End testingSwapnilNarayan
 
Mobile Automation Meetup Presentation [English]
Mobile Automation Meetup Presentation [English]Mobile Automation Meetup Presentation [English]
Mobile Automation Meetup Presentation [English]Maria Carcar
 
Native Script Overview
Native Script OverviewNative Script Overview
Native Script OverviewBaskar rao Dsn
 

Similar to CS02A - Interacting with applications.pptx (20)

Selenium
SeleniumSelenium
Selenium
 
Introduction to selenium
Introduction to seleniumIntroduction to selenium
Introduction to selenium
 
Native script overview
Native script overviewNative script overview
Native script overview
 
Selenium using Java
Selenium using JavaSelenium using Java
Selenium using Java
 
automation framework
automation frameworkautomation framework
automation framework
 
Selenium training
Selenium trainingSelenium training
Selenium training
 
Automation Testing
Automation TestingAutomation Testing
Automation Testing
 
Automation Testing using Selenium Webdriver
Automation Testing using Selenium WebdriverAutomation Testing using Selenium Webdriver
Automation Testing using Selenium Webdriver
 
Automating Mobile Applications
Automating Mobile ApplicationsAutomating Mobile Applications
Automating Mobile Applications
 
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)
 
Test automation lesson
Test automation lessonTest automation lesson
Test automation lesson
 
Cross Platform Appium Tests: How To
Cross Platform Appium Tests: How ToCross Platform Appium Tests: How To
Cross Platform Appium Tests: How To
 
Selenium Camp 2016 - Kiev, Ukraine
Selenium Camp 2016 -  Kiev, UkraineSelenium Camp 2016 -  Kiev, Ukraine
Selenium Camp 2016 - Kiev, Ukraine
 
Selenium
SeleniumSelenium
Selenium
 
Selenium testing - Handle Elements in WebDriver
Selenium testing - Handle Elements in WebDriver Selenium testing - Handle Elements in WebDriver
Selenium testing - Handle Elements in WebDriver
 
Automating android
Automating androidAutomating android
Automating android
 
Slides for Automation Testing or End to End testing
Slides for Automation Testing or End to End testingSlides for Automation Testing or End to End testing
Slides for Automation Testing or End to End testing
 
Mobile Automation Meetup Presentation [English]
Mobile Automation Meetup Presentation [English]Mobile Automation Meetup Presentation [English]
Mobile Automation Meetup Presentation [English]
 
Selenium
SeleniumSelenium
Selenium
 
Native Script Overview
Native Script OverviewNative Script Overview
Native Script Overview
 

Recently uploaded

dehradun Call Girls 👙 6297143586 👙 Genuine WhatsApp Number for Real Meet
dehradun Call Girls 👙 6297143586 👙 Genuine WhatsApp Number for Real Meetdehradun Call Girls 👙 6297143586 👙 Genuine WhatsApp Number for Real Meet
dehradun Call Girls 👙 6297143586 👙 Genuine WhatsApp Number for Real MeetCall Girls Service
 
Kolkata Call Girls Miss Inaaya ❤️ at @30% discount Everyday Call girl
Kolkata Call Girls Miss Inaaya ❤️ at @30% discount Everyday Call girlKolkata Call Girls Miss Inaaya ❤️ at @30% discount Everyday Call girl
Kolkata Call Girls Miss Inaaya ❤️ at @30% discount Everyday Call girlonly4webmaster01
 
Ernakulam Call Girls 👙 6297143586 👙 Genuine WhatsApp Number for Real Meet
Ernakulam Call Girls 👙 6297143586 👙 Genuine WhatsApp Number for Real MeetErnakulam Call Girls 👙 6297143586 👙 Genuine WhatsApp Number for Real Meet
Ernakulam Call Girls 👙 6297143586 👙 Genuine WhatsApp Number for Real MeetCall Girls Chandigarh
 
Hubli Call Girls 👙 6297143586 👙 Genuine WhatsApp Number for Real Meet
Hubli Call Girls 👙 6297143586 👙 Genuine WhatsApp Number for Real MeetHubli Call Girls 👙 6297143586 👙 Genuine WhatsApp Number for Real Meet
Hubli Call Girls 👙 6297143586 👙 Genuine WhatsApp Number for Real MeetCall Girls Service
 
Patna Call Girls 👙 6297143586 👙 Genuine WhatsApp Number for Real Meet
Patna Call Girls 👙 6297143586 👙 Genuine WhatsApp Number for Real MeetPatna Call Girls 👙 6297143586 👙 Genuine WhatsApp Number for Real Meet
Patna Call Girls 👙 6297143586 👙 Genuine WhatsApp Number for Real MeetCall Girls Service
 
Rajkot Call Girls 👙 6297143586 👙 Genuine WhatsApp Number for Real Meet
Rajkot Call Girls 👙 6297143586 👙 Genuine WhatsApp Number for Real MeetRajkot Call Girls 👙 6297143586 👙 Genuine WhatsApp Number for Real Meet
Rajkot Call Girls 👙 6297143586 👙 Genuine WhatsApp Number for Real MeetCall Girls Service
 
bhopal Call Girls 👙 6297143586 👙 Genuine WhatsApp Number for Real Meet
bhopal Call Girls 👙 6297143586 👙 Genuine WhatsApp Number for Real Meetbhopal Call Girls 👙 6297143586 👙 Genuine WhatsApp Number for Real Meet
bhopal Call Girls 👙 6297143586 👙 Genuine WhatsApp Number for Real MeetCall Girls Service
 
Sambalpur Call Girls 👙 6297143586 👙 Genuine WhatsApp Number for Real Meet
Sambalpur Call Girls 👙 6297143586 👙 Genuine WhatsApp Number for Real MeetSambalpur Call Girls 👙 6297143586 👙 Genuine WhatsApp Number for Real Meet
Sambalpur Call Girls 👙 6297143586 👙 Genuine WhatsApp Number for Real MeetCall Girls Service
 
Jaipur Call Girls 9257276172 Call Girl in Jaipur Rajasthan
Jaipur Call Girls 9257276172 Call Girl in Jaipur RajasthanJaipur Call Girls 9257276172 Call Girl in Jaipur Rajasthan
Jaipur Call Girls 9257276172 Call Girl in Jaipur Rajasthanindiancallgirl4rent
 
(Deeksha) 💓 9920725232 💓High Profile Call Girls Navi Mumbai You Can Get The S...
(Deeksha) 💓 9920725232 💓High Profile Call Girls Navi Mumbai You Can Get The S...(Deeksha) 💓 9920725232 💓High Profile Call Girls Navi Mumbai You Can Get The S...
(Deeksha) 💓 9920725232 💓High Profile Call Girls Navi Mumbai You Can Get The S...Ahmedabad Call Girls
 
Call Girls Service In Goa 💋 9316020077💋 Goa Call Girls By Russian Call Girl...
Call Girls Service In Goa  💋 9316020077💋 Goa Call Girls  By Russian Call Girl...Call Girls Service In Goa  💋 9316020077💋 Goa Call Girls  By Russian Call Girl...
Call Girls Service In Goa 💋 9316020077💋 Goa Call Girls By Russian Call Girl...russian goa call girl and escorts service
 
bhubaneswar Call Girls 👙 6297143586 👙 Genuine WhatsApp Number for Real Meet
bhubaneswar Call Girls 👙 6297143586 👙 Genuine WhatsApp Number for Real Meetbhubaneswar Call Girls 👙 6297143586 👙 Genuine WhatsApp Number for Real Meet
bhubaneswar Call Girls 👙 6297143586 👙 Genuine WhatsApp Number for Real MeetCall Girls Service
 
❤️Call girls in Jalandhar ☎️9876848877☎️ Call Girl service in Jalandhar☎️ Jal...
❤️Call girls in Jalandhar ☎️9876848877☎️ Call Girl service in Jalandhar☎️ Jal...❤️Call girls in Jalandhar ☎️9876848877☎️ Call Girl service in Jalandhar☎️ Jal...
❤️Call girls in Jalandhar ☎️9876848877☎️ Call Girl service in Jalandhar☎️ Jal...chandigarhentertainm
 
Krishnagiri call girls Tamil Actress sex service 7877702510
Krishnagiri call girls Tamil Actress sex service 7877702510Krishnagiri call girls Tamil Actress sex service 7877702510
Krishnagiri call girls Tamil Actress sex service 7877702510Vipesco
 
Bhagalpur Call Girls 👙 6297143586 👙 Genuine WhatsApp Number for Real Meet
Bhagalpur Call Girls 👙 6297143586 👙 Genuine WhatsApp Number for Real MeetBhagalpur Call Girls 👙 6297143586 👙 Genuine WhatsApp Number for Real Meet
Bhagalpur Call Girls 👙 6297143586 👙 Genuine WhatsApp Number for Real MeetCall Girls Service
 
ooty Call Girls 👙 6297143586 👙 Genuine WhatsApp Number for Real Meet
ooty Call Girls 👙 6297143586 👙 Genuine WhatsApp Number for Real Meetooty Call Girls 👙 6297143586 👙 Genuine WhatsApp Number for Real Meet
ooty Call Girls 👙 6297143586 👙 Genuine WhatsApp Number for Real MeetCall Girls Service
 
Tirupati Call Girls 👙 6297143586 👙 Genuine WhatsApp Number for Real Meet
Tirupati Call Girls 👙 6297143586 👙 Genuine WhatsApp Number for Real MeetTirupati Call Girls 👙 6297143586 👙 Genuine WhatsApp Number for Real Meet
Tirupati Call Girls 👙 6297143586 👙 Genuine WhatsApp Number for Real MeetCall Girls Service
 
Premium Call Girls Bangalore {7304373326} ❤️VVIP POOJA Call Girls in Bangalor...
Premium Call Girls Bangalore {7304373326} ❤️VVIP POOJA Call Girls in Bangalor...Premium Call Girls Bangalore {7304373326} ❤️VVIP POOJA Call Girls in Bangalor...
Premium Call Girls Bangalore {7304373326} ❤️VVIP POOJA Call Girls in Bangalor...Sheetaleventcompany
 
Best Lahore Escorts 😮‍💨03250114445 || VIP escorts in Lahore
Best Lahore Escorts 😮‍💨03250114445 || VIP escorts in LahoreBest Lahore Escorts 😮‍💨03250114445 || VIP escorts in Lahore
Best Lahore Escorts 😮‍💨03250114445 || VIP escorts in LahoreDeny Daniel
 
raisen Call Girls 👙 6297143586 👙 Genuine WhatsApp Number for Real Meet
raisen Call Girls 👙 6297143586 👙 Genuine WhatsApp Number for Real Meetraisen Call Girls 👙 6297143586 👙 Genuine WhatsApp Number for Real Meet
raisen Call Girls 👙 6297143586 👙 Genuine WhatsApp Number for Real MeetCall Girls Service
 

Recently uploaded (20)

dehradun Call Girls 👙 6297143586 👙 Genuine WhatsApp Number for Real Meet
dehradun Call Girls 👙 6297143586 👙 Genuine WhatsApp Number for Real Meetdehradun Call Girls 👙 6297143586 👙 Genuine WhatsApp Number for Real Meet
dehradun Call Girls 👙 6297143586 👙 Genuine WhatsApp Number for Real Meet
 
Kolkata Call Girls Miss Inaaya ❤️ at @30% discount Everyday Call girl
Kolkata Call Girls Miss Inaaya ❤️ at @30% discount Everyday Call girlKolkata Call Girls Miss Inaaya ❤️ at @30% discount Everyday Call girl
Kolkata Call Girls Miss Inaaya ❤️ at @30% discount Everyday Call girl
 
Ernakulam Call Girls 👙 6297143586 👙 Genuine WhatsApp Number for Real Meet
Ernakulam Call Girls 👙 6297143586 👙 Genuine WhatsApp Number for Real MeetErnakulam Call Girls 👙 6297143586 👙 Genuine WhatsApp Number for Real Meet
Ernakulam Call Girls 👙 6297143586 👙 Genuine WhatsApp Number for Real Meet
 
Hubli Call Girls 👙 6297143586 👙 Genuine WhatsApp Number for Real Meet
Hubli Call Girls 👙 6297143586 👙 Genuine WhatsApp Number for Real MeetHubli Call Girls 👙 6297143586 👙 Genuine WhatsApp Number for Real Meet
Hubli Call Girls 👙 6297143586 👙 Genuine WhatsApp Number for Real Meet
 
Patna Call Girls 👙 6297143586 👙 Genuine WhatsApp Number for Real Meet
Patna Call Girls 👙 6297143586 👙 Genuine WhatsApp Number for Real MeetPatna Call Girls 👙 6297143586 👙 Genuine WhatsApp Number for Real Meet
Patna Call Girls 👙 6297143586 👙 Genuine WhatsApp Number for Real Meet
 
Rajkot Call Girls 👙 6297143586 👙 Genuine WhatsApp Number for Real Meet
Rajkot Call Girls 👙 6297143586 👙 Genuine WhatsApp Number for Real MeetRajkot Call Girls 👙 6297143586 👙 Genuine WhatsApp Number for Real Meet
Rajkot Call Girls 👙 6297143586 👙 Genuine WhatsApp Number for Real Meet
 
bhopal Call Girls 👙 6297143586 👙 Genuine WhatsApp Number for Real Meet
bhopal Call Girls 👙 6297143586 👙 Genuine WhatsApp Number for Real Meetbhopal Call Girls 👙 6297143586 👙 Genuine WhatsApp Number for Real Meet
bhopal Call Girls 👙 6297143586 👙 Genuine WhatsApp Number for Real Meet
 
Sambalpur Call Girls 👙 6297143586 👙 Genuine WhatsApp Number for Real Meet
Sambalpur Call Girls 👙 6297143586 👙 Genuine WhatsApp Number for Real MeetSambalpur Call Girls 👙 6297143586 👙 Genuine WhatsApp Number for Real Meet
Sambalpur Call Girls 👙 6297143586 👙 Genuine WhatsApp Number for Real Meet
 
Jaipur Call Girls 9257276172 Call Girl in Jaipur Rajasthan
Jaipur Call Girls 9257276172 Call Girl in Jaipur RajasthanJaipur Call Girls 9257276172 Call Girl in Jaipur Rajasthan
Jaipur Call Girls 9257276172 Call Girl in Jaipur Rajasthan
 
(Deeksha) 💓 9920725232 💓High Profile Call Girls Navi Mumbai You Can Get The S...
(Deeksha) 💓 9920725232 💓High Profile Call Girls Navi Mumbai You Can Get The S...(Deeksha) 💓 9920725232 💓High Profile Call Girls Navi Mumbai You Can Get The S...
(Deeksha) 💓 9920725232 💓High Profile Call Girls Navi Mumbai You Can Get The S...
 
Call Girls Service In Goa 💋 9316020077💋 Goa Call Girls By Russian Call Girl...
Call Girls Service In Goa  💋 9316020077💋 Goa Call Girls  By Russian Call Girl...Call Girls Service In Goa  💋 9316020077💋 Goa Call Girls  By Russian Call Girl...
Call Girls Service In Goa 💋 9316020077💋 Goa Call Girls By Russian Call Girl...
 
bhubaneswar Call Girls 👙 6297143586 👙 Genuine WhatsApp Number for Real Meet
bhubaneswar Call Girls 👙 6297143586 👙 Genuine WhatsApp Number for Real Meetbhubaneswar Call Girls 👙 6297143586 👙 Genuine WhatsApp Number for Real Meet
bhubaneswar Call Girls 👙 6297143586 👙 Genuine WhatsApp Number for Real Meet
 
❤️Call girls in Jalandhar ☎️9876848877☎️ Call Girl service in Jalandhar☎️ Jal...
❤️Call girls in Jalandhar ☎️9876848877☎️ Call Girl service in Jalandhar☎️ Jal...❤️Call girls in Jalandhar ☎️9876848877☎️ Call Girl service in Jalandhar☎️ Jal...
❤️Call girls in Jalandhar ☎️9876848877☎️ Call Girl service in Jalandhar☎️ Jal...
 
Krishnagiri call girls Tamil Actress sex service 7877702510
Krishnagiri call girls Tamil Actress sex service 7877702510Krishnagiri call girls Tamil Actress sex service 7877702510
Krishnagiri call girls Tamil Actress sex service 7877702510
 
Bhagalpur Call Girls 👙 6297143586 👙 Genuine WhatsApp Number for Real Meet
Bhagalpur Call Girls 👙 6297143586 👙 Genuine WhatsApp Number for Real MeetBhagalpur Call Girls 👙 6297143586 👙 Genuine WhatsApp Number for Real Meet
Bhagalpur Call Girls 👙 6297143586 👙 Genuine WhatsApp Number for Real Meet
 
ooty Call Girls 👙 6297143586 👙 Genuine WhatsApp Number for Real Meet
ooty Call Girls 👙 6297143586 👙 Genuine WhatsApp Number for Real Meetooty Call Girls 👙 6297143586 👙 Genuine WhatsApp Number for Real Meet
ooty Call Girls 👙 6297143586 👙 Genuine WhatsApp Number for Real Meet
 
Tirupati Call Girls 👙 6297143586 👙 Genuine WhatsApp Number for Real Meet
Tirupati Call Girls 👙 6297143586 👙 Genuine WhatsApp Number for Real MeetTirupati Call Girls 👙 6297143586 👙 Genuine WhatsApp Number for Real Meet
Tirupati Call Girls 👙 6297143586 👙 Genuine WhatsApp Number for Real Meet
 
Premium Call Girls Bangalore {7304373326} ❤️VVIP POOJA Call Girls in Bangalor...
Premium Call Girls Bangalore {7304373326} ❤️VVIP POOJA Call Girls in Bangalor...Premium Call Girls Bangalore {7304373326} ❤️VVIP POOJA Call Girls in Bangalor...
Premium Call Girls Bangalore {7304373326} ❤️VVIP POOJA Call Girls in Bangalor...
 
Best Lahore Escorts 😮‍💨03250114445 || VIP escorts in Lahore
Best Lahore Escorts 😮‍💨03250114445 || VIP escorts in LahoreBest Lahore Escorts 😮‍💨03250114445 || VIP escorts in Lahore
Best Lahore Escorts 😮‍💨03250114445 || VIP escorts in Lahore
 
raisen Call Girls 👙 6297143586 👙 Genuine WhatsApp Number for Real Meet
raisen Call Girls 👙 6297143586 👙 Genuine WhatsApp Number for Real Meetraisen Call Girls 👙 6297143586 👙 Genuine WhatsApp Number for Real Meet
raisen Call Girls 👙 6297143586 👙 Genuine WhatsApp Number for Real Meet
 

CS02A - Interacting with applications.pptx

  • 2. Agenda • Interaction with applications • Automation basics • Application Types • Selenium basics • Application Platforms
  • 3. Interacting with applications – why Automation • In the previous session we showed Perfecto’s basic support for Manual testing of applications on Perfecto Lab devices. • One disadvantage of manual testing is the inability to completely repeat the test. • Performing the steps exactly in the same order is problematic. • The timing of the interactions is never the same. • Automation addresses these problems • Prepare the full test process in a software platform. • Execute the test script repetitively – always the same process and timing. • May be executed by CI tools – like Jenkins. • Selenium and Appium are open source testing frameworks for automation, with support for standard programming
  • 4. Automation - basics • Automation tests require interacting with the application through software commands – • Clicking on buttons, • Entering text in text fields, • Selecting values, • etc. • All of these actions require that the automation “script” can identify the elements that appear on the applications UI. • There are 2 ways to perform this: • Using the programmed information of the Application Objects • Using Visual Analysis to perform the actions on the screen Both Object manipulation and Visual analysis are supported by Perfecto
  • 5. Object Interaction • The input for this method is the XML/HTML provided by the application. • We identify the object we want and then select the desired action: • Click • Text Entry • Swipe • Etc. • Object interaction is fast, reliable, & robust. • Objects are identified by an XPath or similar specification. • Stay tuned for the XPath unit.
  • 6. Visual Interaction • Visual Analysis uses a screenshot taken from the device. • The screenshot is analyzed • Using an OCR engine for finding text • Using a bitmap comparison engine for images. • This method works directly on what the user sees but is slower & less reliable. • Slower – takes time to analyze the screenshot image. • Less reliable – cannot guarantee 100% match, usually settle for less. • It is valuable when used sparingly in the correct places in the test. • For example, when dismissing system popups or other dynamic objects. • Identifying image buttons.
  • 7. Application Types • There are 3 types of applications in the market today: • Web applications – run on a mobile or desktop browser. • Can be tested on both mobile & desktop. • Objects are identified with an XPath expression – using DOM objects. • The Selenium driver is preferred tool to run automation tests. • Native Mobile Applications • Installed on a mobile device, (usually) from the app store. • Separate code base per platform. • Objects are identified with XPath (with iOS variations) specification • Appium driver is preferred tool to run automation tests
  • 8. Application Types Continued • Hybrid Applications • Installed on a mobile device, from the app store • Characterized by a Web-based interface embedded in a Native application environment. • Native environment is separate code base per platform • Web-based interface is based on HTML specifications. • Objects are identified with XPath (with iOS variations) specification • May require switching to different object trees. • Appium driver is preferred tool to run automation tests
  • 9. Automation Drivers • Automation “scripts” connect to the device running the target application either • Over a software connection – like a browser running on the workstation. • Over a hardware connection – like a USB connection to the workstation. • Over a “cloud” connection – using the Perfecto CQ Lab devices. • Each automation script needs a “connection manager” that drives the connection to the target device and application. • Selenium provides drivers for different interactions with Web Applications. • RemoteWebDriver class provides support for Perfecto Lab connections. • Perfecto also provides a RemoteWebDriverExtended class that
  • 10. Selenium – Getting Started • A Selenium “script” starts by creating a RemoteWebDriver instance. • Configure the driver instance, using DesiredCapabilities. • Provide authentication information to connect to Perfecto CQ Lab. • Provide basic device information • Provide information on how to reference the script and its environment. DesiredCapabilities capabilities = new DesiredCapabilities(browserName, string.Empty, new Platform(PlatformType.Any)); // authentication information capabilities.SetCapability("user", "[ENTER YOUR USER NAME HERE]"); capabilities.SetCapability("password", "[ENTER YOUR PASSWORD HERE]"); //Provide your device selection criteria capabilities.SetCapability("platformName", "Android"); // Name your script capabilities.SetCapability("scriptName", "Test user agent"); // create the instance var url = new Uri(string.Format("https://{0}/nexperience/perfectomobile/wd/hub", host)); driver = new RemoteWebDriver(url, capabilities);
  • 11. Capabilities - Authentication • When driver instance connects to the Perfecto CQ Lab, the connection is made through the tester’s Perfecto account. • Need to provide your credentials – • “user” capability – provides Perfecto account username. • “password” capability – provides Perfecto account password. • “securityToken” capability – For Perfecto Lab configured for use of a Security Token - provides Perfecto account’s valid Security token.
  • 12. Capabilities – Device Selection • In the “Working with Devices” unit we showed how to select a device for manual testing, using the different device attributes. • The Selenium driver selects a device to work with, based on the device attributes that you supply in the capabilities. • Use capabilities to provide the device selection criteria: • “platformName” – indicates the device OS (e.g. “Windows”, “iOS”) • “platformVersion” – indicates the OS version • “deviceName” – provides Device ID of specific mobile device. • “model” – provides model name of mobile device (e.g. “iPad”, “Pixel”) • “browserName” – name of desktop browser to run (e.g. “Chrome”, “Edge”) • “resolution” – display resolution for desktop device (e.g. “1024x768”) • See more information here.
  • 13. Capabilities – Script Identification • Use the “scriptName” capability to provide a name for your script that will appear both in the execution reporting interface and the execution manager interface. • Learn more about the capabilities supported by Perfecto on the Defining Capabilities page and its child pages.
  • 14. Object Recognition by Platform • XPath is the primary identification method. • For iOS there are alternatives that are tailored to UI e.g. accessibility ID & class name. • In this course, we will begin by explaining XML & XPath and then dedicate time to iOS objects. • After understanding object interactions we will study Perfecto’s Visual Analysis support.
  • 15. Selenium - FindElements • To look for an object in your automation script, the Selenium driver supports different flavors of the FindElement method (see below) • For most of our purposes we will use the FindElementByXPath() method.

Editor's Notes

  1. There are different types of apps – web, hybrid & native which run on different platforms. In this module we’ll make sense of all the options and explain how to work with each app. In later modules we will go in-depth into the how-to of all we are presenting now.
  2. Objects are recommended as the best practice Visual is strongly dependent on screen size and resolution, should be used mainly for validation, or when objects are not possible