README.rdoc in marekj-watirloo-0.0.3 vs README.rdoc in marekj-watirloo-0.0.5
- old
+ new
@@ -1,112 +1,95 @@
= Watirloo
-* http://watirloo.testr.us
+* http://github.com/marekj/watirloo
== 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
+Custom Extensions for Watir, Firewatir. Acceptance Test Helper based on semantic page objects modeling customer's domain language
+It helps you write human readable and machine executable browser tests. Isolates GUI from Tests.
-Give it a try. You will like it.
+The Human Readable part helps you create interfaces to elements on the page and tags them with friendly names
+based on vocabulary of Business Domain. The Machine Executable parts talk to Watir API hooking into DOM elements.
+it helps you concentrate in your acceptance tests on the intention and the customer's language and not on implementation of DOM.
+Write customer facing tests hence the metaphor of face for Page Objects of Significance to the Customer.
== 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
+* Extensioins to Watir and Firewatir gems to ease testing
+* group radios in #radio_group and checkboxes in #checkbox_group and acts each group as page object
+* Maintains multiple browsers on the desktop and stores window handles so you can reattach to the browser under test later (see Watirloo::Locker)
+* Watches and maintains your desktop for browsers existence. (Watirloo::Desktop)
+* Browser is managed automatically with Watirloo::browser
+* Isolates GUI from tests with face methods that introduce customer facing friendly names for elements
+* add reflect method to generate scaffolding code for your page elements (reflect currently uses browser as container. Alter scaffodling if you use frames)
+* look at spec dir for examples of usage with rspec
+
== SYNOPSIS:
-By convention Watirloo::Page.new attaches itself to the existing IE browser instance on the desktop.
+By convention Watirloo::browser attaches itself to the existing IE browser instance on the desktop and maintains the handles to reattach later
-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
+Example:
- 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"
+ Given a page with text fields for last name and first name
+ When I want to enter the name 'Kurt Vonnegut'
+ And I don't want to talk to implementation
+ But I want a friendly name of element on the page
+ Then I use Watirloo shortcuts
+ When I define an interface to watir implementation with a semantic key
+ And I define my data as hash with the same semantic key
+ Then I can automatically let watirloo enter my test data on a page
-Or you can create a wrapper method that delegates to the browser
-
- class Person < Watirloo::Page
- def last
- @b.text_field(:name, 'lnm')
+ # rspec as container
+
+ describe "using watirloo page to isolate and bind gui view to data" do
+ include Watirloo::Page
+ face(:last) {browser.text_field(:name, 'l_nm')}
+ face(:first) {browser.text_field(:name, 'f_nm')}
+
+ it "enters data on the page" do
+ last.set "Vonnegut"
+ first.set "Kurt"
+ end
+
+ it "sprays data on elements defined" do
+ spray :last => 'Vonnegut', :first => 'Kurt'
+ end
+
+ it "grabs data from elements and validates" do
+ data = {:first => "Kurt", :last => 'Vonnegut'}
+ spray data
+ scrape(data.keys).should == data
+ end
+
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
+* watir = 1.6.2
+* firewatir = 1.6.2 if you want to use Firefox
+* newgem
+* rspec gem if you want to run watirloo examples included
== INSTALL:
-* gem install watirloo
+* Run the following if you haven't already:
+ gem sources -a http://gems.github.com
-=== ROADMAP
+* Install the gem(s):
+ gem install marekj-watirloo
-Towards version 0.0.3
+* or download from : http://github.com/marekj/watirloo/downloads
-* 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
+=== ROADMAP
-Towards version 0.0.2
+* add Logging gem and log all actions for audit
+* provide UserStory type of container for exploratory testing (UseCase, Feature, TestScenario etc...)
+* provide examples for Cucumber
+* make specs run with firewatir
-* 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.
-
+http://www.opensource.org/licenses/mit-license.php