The goal of this repo is to familiarize web developers with features of WatirPump
-
a new PageObject library for Watir. Each section of this tutorial
covers another feature of WatirPump
, gradually increasing the complexity.
Each one consists of a brief description and an example test (rspec
).
The examples use static HTML pages that can be found in docs
directory.
They are being served through GitHub Pages under this link.
For the sake of local rspec
execution a sinatra
server is being spin up to
serve these pages faster and without the necessity of being online.
Please refer to WatirPump's README for more comprehensive documentation on the API.
WatirPump internally uses addressable gem to support URL parametrization.
Parts that are common to several pages can be extracted to a shared base page and inherited.
Example specs to be added in the future.
There are two ways of addressing elements with a lambda:
- using element type specific Watir methods see the spec
- using element type agnostic
element
method see the spec
Works similarly as single elements. Use watir
methods that return collections (e.g. links
, buttons
, etc.) to find out.
Example specs to be added in the future.
Use it as a shorthand for instance method creation. Parameters are accepted and no validation of returned value is performed.
Example specs to be added in the future.