SlideShare a Scribd company logo
1 of 23
Download to read offline
Alex Warmling | Carlos Tadeu Panato Jr | Fausto Siqueira
Espremendo Melancia
Watir+PageObject
Automate your web browser
beautifully, nicely and
easily with some very sweet
syntactic sugar.
Agenda
● What is Watir?
● Benefits using Watir
● What is PageObject?
● Benefits using PageObject
● How to use
● Everything mixed with multi-browser?
● What is SauceLabs?
Who created Watir?
Watir is the creation
of people committed
to making testing easier
http://watir.com/team/
What is Watir?
● Is an open-source
● Family of Ruby libraries for automating web browsers
● Drives browsers the same way people do
● No matter what technology it is developed in
Why Watir?
● There’s a very active and growing community behind it
● It uses Ruby, a full-featured modern scripting language
● It supports multiple browsers on different platforms
● It is powerful and easy to use, yet beautifully lightweight
● No test records (training wheels)
● No xpath selectors!
● Cucumber and Watir-WebDriver sitting in a tree
Why Watir?
● No find_element(s) === less code;
● Specific methods (divs, buttons, links…);
In Selenium: driver.find_element(:class, 'product-title')
In Watir: driver.div :class => ‘product-title’
● Explicit waits for AJAX (for Selenium :timeout => 10)
● JavaScript alerts
● Measure Page Performance
● Easy to work with iFrames
● PageObject
Chaordic Mindset to write
your Automated scripts
Testing your script
example
● Wireframe = Maps web UI elements
● Devs do homework = IDs
● QA creates a class (model) for the
page
● Model will support testing
● DRY
● Easy API
● Action or text retrieval
○ click > PageObject.button
○ get text > PageObject.text_field
● Checks existence
○ PageObject.button?
○ PageObject.div?
● Element return
○ PageObject.div_element
● Checkbox
○ check_active, uncheck_active, active_checked?
Acessors
auto
methods
example
class
script class
UI
elements
naming
update
script class
● Need run the several type
of browsers and versions
● How maintain the
infrastructure ?
Multi
Browser
Sauce Labs’ cloud testing
platform allows you to automatically
or interactively test mobile and
web applications on 300+ browsers
and platforms.
● Dont need maintain infrastructure
● Support for mobile testing
● Latest and old browsers versions
● Also can run JS Unit Tests
example
Alex Warmling | alex@chaordic.com.br
Carlos Tadeu Panato Jr | tadeu@chaordic.com.br
Fausto Siqueira | siqueira@chaordic.com.br
/chaordic.com.br

More Related Content

What's hot

Choosing the best JavaScript framework/library/toolkit
Choosing the best JavaScript framework/library/toolkitChoosing the best JavaScript framework/library/toolkit
Choosing the best JavaScript framework/library/toolkit
Hristo Chakarov
 
Prototyping app using JS and HTML5 (Ciklum Kharkiv)
Prototyping app using JS and HTML5 (Ciklum Kharkiv)Prototyping app using JS and HTML5 (Ciklum Kharkiv)
Prototyping app using JS and HTML5 (Ciklum Kharkiv)
Yuriy Silvestrov
 
Sfd hanoi2012 nguyen ha duong yang node.js-intro
Sfd hanoi2012 nguyen ha duong yang   node.js-introSfd hanoi2012 nguyen ha duong yang   node.js-intro
Sfd hanoi2012 nguyen ha duong yang node.js-intro
Vu Hung Nguyen
 

What's hot (19)

WebdriverIO: the Swiss Army Knife of testing
WebdriverIO: the Swiss Army Knife of testingWebdriverIO: the Swiss Army Knife of testing
WebdriverIO: the Swiss Army Knife of testing
 
Introduction to Vue.js DevStaff Meetup 13.02
Introduction to Vue.js  DevStaff Meetup 13.02Introduction to Vue.js  DevStaff Meetup 13.02
Introduction to Vue.js DevStaff Meetup 13.02
 
A guide to getting started with WebdriverIO
A guide to getting started with WebdriverIOA guide to getting started with WebdriverIO
A guide to getting started with WebdriverIO
 
지난 2년동안 망고플레이트에서 배운 것
지난 2년동안 망고플레이트에서 배운 것지난 2년동안 망고플레이트에서 배운 것
지난 2년동안 망고플레이트에서 배운 것
 
Introduction to PhantomJS
Introduction to PhantomJSIntroduction to PhantomJS
Introduction to PhantomJS
 
Unscrambling An Omelette - How Companies Can Use WordPress Better - Jeremy Ke...
Unscrambling An Omelette - How Companies Can Use WordPress Better - Jeremy Ke...Unscrambling An Omelette - How Companies Can Use WordPress Better - Jeremy Ke...
Unscrambling An Omelette - How Companies Can Use WordPress Better - Jeremy Ke...
 
One step in the future: CSS variables
One step in the future: CSS variablesOne step in the future: CSS variables
One step in the future: CSS variables
 
Using Javascript in today's world
Using Javascript in today's worldUsing Javascript in today's world
Using Javascript in today's world
 
Choosing the best JavaScript framework/library/toolkit
Choosing the best JavaScript framework/library/toolkitChoosing the best JavaScript framework/library/toolkit
Choosing the best JavaScript framework/library/toolkit
 
Building APIs the serverless way
Building APIs the serverless wayBuilding APIs the serverless way
Building APIs the serverless way
 
Javascript and DOM
Javascript and DOMJavascript and DOM
Javascript and DOM
 
WebSite development using WinJS
WebSite development using WinJSWebSite development using WinJS
WebSite development using WinJS
 
Introduction To JavaScript
Introduction To JavaScriptIntroduction To JavaScript
Introduction To JavaScript
 
Web without framework
Web without frameworkWeb without framework
Web without framework
 
Going Node.js at Netflix
Going Node.js at NetflixGoing Node.js at Netflix
Going Node.js at Netflix
 
Introduction to git & WordPress
Introduction to git & WordPressIntroduction to git & WordPress
Introduction to git & WordPress
 
Prototyping app using JS and HTML5 (Ciklum Kharkiv)
Prototyping app using JS and HTML5 (Ciklum Kharkiv)Prototyping app using JS and HTML5 (Ciklum Kharkiv)
Prototyping app using JS and HTML5 (Ciklum Kharkiv)
 
Making websites with WordPress
Making websites with WordPressMaking websites with WordPress
Making websites with WordPress
 
Sfd hanoi2012 nguyen ha duong yang node.js-intro
Sfd hanoi2012 nguyen ha duong yang   node.js-introSfd hanoi2012 nguyen ha duong yang   node.js-intro
Sfd hanoi2012 nguyen ha duong yang node.js-intro
 

Similar to Espremendo melancia | TDC2014 Floripa | Chaordic

Selenium Online Training.pdf
Selenium Online Training.pdfSelenium Online Training.pdf
Selenium Online Training.pdf
SpiritsoftsTraining
 
UI Testing Automation
UI Testing AutomationUI Testing Automation
UI Testing Automation
AgileEngine
 

Similar to Espremendo melancia | TDC2014 Floripa | Chaordic (20)

Selenium Online Training.pdf
Selenium Online Training.pdfSelenium Online Training.pdf
Selenium Online Training.pdf
 
Selenium Online Training.pdf
Selenium Online Training.pdfSelenium Online Training.pdf
Selenium Online Training.pdf
 
Selenium Online Training.pdf
Selenium Online Training.pdfSelenium Online Training.pdf
Selenium Online Training.pdf
 
Selenium Online Training.pdf
Selenium Online Training.pdfSelenium Online Training.pdf
Selenium Online Training.pdf
 
Selenium Online Training.pdf
Selenium Online Training.pdfSelenium Online Training.pdf
Selenium Online Training.pdf
 
Selenium Automation
Selenium AutomationSelenium Automation
Selenium Automation
 
Automation Abstractions: Page Objects and Beyond
Automation Abstractions: Page Objects and BeyondAutomation Abstractions: Page Objects and Beyond
Automation Abstractions: Page Objects and Beyond
 
Mastering Test Automation: How To Use Selenium Successfully
Mastering Test Automation: How To Use Selenium SuccessfullyMastering Test Automation: How To Use Selenium Successfully
Mastering Test Automation: How To Use Selenium Successfully
 
Hands on Exploration of Page Objects and Abstraction Layers with Selenium Web...
Hands on Exploration of Page Objects and Abstraction Layers with Selenium Web...Hands on Exploration of Page Objects and Abstraction Layers with Selenium Web...
Hands on Exploration of Page Objects and Abstraction Layers with Selenium Web...
 
Web ui testing
Web ui testingWeb ui testing
Web ui testing
 
Selenium topic 3 -Web Driver Basics
Selenium topic 3 -Web Driver BasicsSelenium topic 3 -Web Driver Basics
Selenium topic 3 -Web Driver Basics
 
Discover the power of browser developer tools
Discover the power of browser developer toolsDiscover the power of browser developer tools
Discover the power of browser developer tools
 
UI Testing Automation
UI Testing AutomationUI Testing Automation
UI Testing Automation
 
Enterprise Strength Mobile JavaScript
Enterprise Strength Mobile JavaScriptEnterprise Strength Mobile JavaScript
Enterprise Strength Mobile JavaScript
 
Integrating Selenium testing infrastructure into Scala Project
Integrating Selenium testing infrastructure into Scala ProjectIntegrating Selenium testing infrastructure into Scala Project
Integrating Selenium testing infrastructure into Scala Project
 
Automated ui-testing
Automated ui-testingAutomated ui-testing
Automated ui-testing
 
Test Automation with Twist and Sahi
Test Automation with Twist and SahiTest Automation with Twist and Sahi
Test Automation with Twist and Sahi
 
Creating Modular Test-Driven SPAs with Spring and AngularJS
Creating Modular Test-Driven SPAs with Spring and AngularJSCreating Modular Test-Driven SPAs with Spring and AngularJS
Creating Modular Test-Driven SPAs with Spring and AngularJS
 
Browser Automated Testing Frameworks - Nightwatch.js
Browser Automated Testing Frameworks - Nightwatch.jsBrowser Automated Testing Frameworks - Nightwatch.js
Browser Automated Testing Frameworks - Nightwatch.js
 
Selenium web driver
Selenium web driverSelenium web driver
Selenium web driver
 

Recently uploaded

+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
?#DUbAI#??##{{(☎️+971_581248768%)**%*]'#abortion pills for sale in dubai@
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Safe Software
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
WSO2
 

Recently uploaded (20)

EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWEREMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
 
FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
 
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
Exploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with MilvusExploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with Milvus
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
 
ICT role in 21st century education and its challenges
ICT role in 21st century education and its challengesICT role in 21st century education and its challenges
ICT role in 21st century education and its challenges
 
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
 
DBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor PresentationDBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor Presentation
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of Terraform
 
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingRepurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...
 
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
 

Espremendo melancia | TDC2014 Floripa | Chaordic

  • 1. Alex Warmling | Carlos Tadeu Panato Jr | Fausto Siqueira Espremendo Melancia Watir+PageObject
  • 2. Automate your web browser beautifully, nicely and easily with some very sweet syntactic sugar.
  • 3. Agenda ● What is Watir? ● Benefits using Watir ● What is PageObject? ● Benefits using PageObject ● How to use ● Everything mixed with multi-browser? ● What is SauceLabs?
  • 4.
  • 5. Who created Watir? Watir is the creation of people committed to making testing easier http://watir.com/team/
  • 6. What is Watir? ● Is an open-source ● Family of Ruby libraries for automating web browsers ● Drives browsers the same way people do ● No matter what technology it is developed in
  • 7. Why Watir? ● There’s a very active and growing community behind it ● It uses Ruby, a full-featured modern scripting language ● It supports multiple browsers on different platforms ● It is powerful and easy to use, yet beautifully lightweight ● No test records (training wheels) ● No xpath selectors! ● Cucumber and Watir-WebDriver sitting in a tree
  • 8. Why Watir? ● No find_element(s) === less code; ● Specific methods (divs, buttons, links…); In Selenium: driver.find_element(:class, 'product-title') In Watir: driver.div :class => ‘product-title’ ● Explicit waits for AJAX (for Selenium :timeout => 10) ● JavaScript alerts ● Measure Page Performance ● Easy to work with iFrames ● PageObject
  • 9. Chaordic Mindset to write your Automated scripts Testing your script
  • 11.
  • 12. ● Wireframe = Maps web UI elements ● Devs do homework = IDs ● QA creates a class (model) for the page ● Model will support testing ● DRY ● Easy API
  • 13. ● Action or text retrieval ○ click > PageObject.button ○ get text > PageObject.text_field ● Checks existence ○ PageObject.button? ○ PageObject.div? ● Element return ○ PageObject.div_element ● Checkbox ○ check_active, uncheck_active, active_checked? Acessors auto methods
  • 18.
  • 19. ● Need run the several type of browsers and versions ● How maintain the infrastructure ? Multi Browser
  • 20. Sauce Labs’ cloud testing platform allows you to automatically or interactively test mobile and web applications on 300+ browsers and platforms. ● Dont need maintain infrastructure ● Support for mobile testing ● Latest and old browsers versions ● Also can run JS Unit Tests
  • 22. Alex Warmling | alex@chaordic.com.br Carlos Tadeu Panato Jr | tadeu@chaordic.com.br Fausto Siqueira | siqueira@chaordic.com.br