Espremendo melancia | TDC2014 Floripa | Chaordic
-
Upload
chaordic -
Category
Technology
-
view
157 -
download
4
Transcript of Espremendo melancia | TDC2014 Floripa | Chaordic
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 creationof people committed
to making testing easierhttp://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
● 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?
Acessorsauto methods
● Need run the several type of browsers and versions
● How maintain the infrastructure ?
MultiBrowser
Sauce Labs’ cloud testingplatform 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
Alex Warmling | [email protected] Tadeu Panato Jr | [email protected] Siqueira | [email protected]