natritmeyer/site_prism — pull request #90 by jnyman (2014-08-08 10:57:15+00:00)
Title: Factory pattern added for using page objects.

The idea here is to provide a mechanism that instantiates page objects by using a simple factory approach. The idea for this is to allow code to take on a very common structure, making it easy to review and easy to build automatic checkers for. This approach is also nice for indicating workflows in a browser application.

There are two factory methods: on_view() and on().

The on_view() factory simply creates the page instance and uses the load() method to bring that page up in the browser. The on() factory creates the page instance but does not need to bring up the page in the browser since it's assumed the relevant page is already in view.