= Watirloo * http://watirloo.testr.us == DESCRIPTION: Watir Framework and Helper based on Semantic Page Objects Modeling. Helps you design tests expressing DOM elements and groups of elements on the page as Semantic Page Objects rather than their DOM implementations. It is not a DSL but it helps you write human readable tests and hooks them up to Watir browsers for implementation Give it a try. You will like it. == FEATURES/PROBLEMS: * Watirloo::Page acts as an adapter with customer facing semantic names for page objects and developer facing implamention talking to the browser. * Page creates an abstraction adapter: Human Readable and Machine Executable. * Pages contain faces; page objects that are named with semantic intent * Best to work with one browser instance on the desktop. * Patches Watir and Firewatir to ease testing * groups radios in radio_group and checkboxes in checkbox_group and acts each group as page object == SYNOPSIS: By convention Watirloo::Page.new attaches itself to the existing IE browser instance on the desktop. Example: Given a page with text fields for last name and first name we want to enter name 'Kurt Vonnegut' You can define hash with key as semantic name and value as watir implementation page = Watirloo::Page.new page.add_face :last => [:text_field, :name, 'l_nm'], :first => [:text_field, :name, 'f_nm'] page.last.set "Vonnegut" page.first.set "Kurt" Or you can create a wrapper method that delegates to the browser class Person < Watirloo::Page def last @b.text_field(:name, 'lnm') end def first @b.text_field(:name, 'fnm') end end Or define a hash where key will match the defined faces to be set params = {:first => 'Kurt', :last => 'Vonnegut'} page = Watirloo::Page.new.spray params Or pass page cofiguration in the block at page creation page = Person.new do last.set 'Vonnegut' first.set 'Kurt' end == REQUIREMENTS: * watir >= 1.6.2 runs on IE by default * firewatir >= 1.6.2 if you want to use Firefox * test/spec gem if you want to run tests * newgem and hoe for dev == INSTALL: * gem install watirloo === ROADMAP Towards version 0.0.3 * DONE: make class level interfaces as base for the class and subclass. remove it from initilize method * UseCase class, scenario based runner * clean up reflector method to reflect according to new interface structures * move RadioGroup and CheckboxGroup to Watir gem (work with Bret) * make RadioGroups and CheckboxGroups classes for both IE and Firefox Towards version 0.0.2 * DONE: make Watirloo agnostic to browser IE or Firefox or Safari * DONE: make tests run on IE, Firefox, Safari with the same interface * DONE: create radio_group to behave like select list and checkbox_group like multi select list * build UseCase class as template for scenario based execution of tests for exploratory testing == LICENSE: (The MIT License) Copyright (c) 2008 marekj Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the 'Software'), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.