README.md

page-object

A simple gem that assists in creating flexible page objects for testing browser based applications. The goal is to facilitate creating abstraction layers in your tests to decouple the tests from the item they are testing and to provide a simple interface to the elements on a page. It works with both watir-webdriver and selenium-webdriver.

Documentation

The project wiki is the first place to go to learn about how to use page-object.

Calling the text_field and button methods adds several methods to our page object that allow us to interact with the items on the page. To login using this page we could simply write the following code:

Creating your page object

page-object supports both watir-webdriver and selenium-webdriver. The one used will be determined by which driver you pass into the constructor of your page object. The page object can be create like this: