Fork me on GitHub

Documentation > PageObject

QATools\QATools\PageObject

No internal dependencies.

Implementation of Page Object pattern as done in Selenium Java library.

Class Overview

Elements (namespace: \QATools\QATools\PageObject\Element)

Name Description
WebElement Class for interacting with one element on page (descendant of NodeElement).
WebElementCollection Class for interacting with several elements on page via iterator.
AbstractElementContainer Base class for creating dedicated classes, that will encapsulate associated elements on a page.

Other

Name Description
\QATools\QATools\PageObject\Page Base class for creating dedicated classes for each of the website pages, that needs to be tested (descendant of DocumentElement).

Annotation Overview

Name Description
@find-by Tells how to find element on a page.
@page-url Sets default url, associated with a Page.

Usage

  1. create subclass from \QATools\QATools\PageObject\Page class
  2. add class properties, that have any element class from described above in their @var annotation
  3. create public method(-s), that would use properties defined before

Continue to Examples

Found a typo ? Something is wrong in this documentation ? Just fork and edit it !