Friday, June 8, 2012

Selenium WebDriver Page Objects

The Page Object pattern represents the screens of your web app as a series of objects. There is a PageFactory in the support package that provides support for this pattern, and helps to remove some boiler-plate code from your Page Objects at the same time.

Below you can find few awesome links on Page Objects in order to understand these in depth:

1. Page Objects in Selenium 2.0
In this post the author looks at the difference between test specification and test implementation and how Selenium achieves this with page objects. [Link]

2. Using Page Objects with Selenium and Web Driver 2.0. [Link]

3. Good explanation of Page Objects, Implementation Notes and an example. [Link]

4. Selenium Page Object Pattern
This post makes you understand how to apply the Page Object design pattern. [Link]

5. Automated Testing Using Page Objects and WebDriver. [Link]

6. Selenium WebDriver: Page Object Pattern and PageFactory. [Link]
This post explains Page Object Pattern, main advantages of Page Object Pattern, Why use PageFactory? and much more.

7. Selenium PageObjects and PageFactory.
This article discusses the PageObject design pattern and a factory class from WebDriver support libraries. [Link]

8. Abstracting Web Page Interaction. [Link]

9. Selenium 2/Web Driver - the Land Where Page Objects are King! [Link]

10. Page Object Model – Introduction - (infact all posts related to Page Object Model, using Integrate Development Environment, called Eclipse). [Link]

11. Page Objects design issues. [Link]

12. Selenium webdriver page object.
It is tough to figure out how to define each page object BUT lets say I have figured that out and defined several page objects that represent our site.
How do you handle crossing from page to page. So I get a page object for my home page and one for my account page and one for my results page. Then I need to write a test that traverses all my pages to simulate a user performing multiple actions. [Link]

13. The PageObject pattern for Selenium WebDriver UI tests. [Link]

14. Selenium Page Objects and Abstraction (explanation that relates the page object pattern to the concept of abstraction in programming). [Link]

15. WebDriver: How to check if an page object web element exists? [Link]