PHPackages                             ravage84/phpunit-selenium2-pageobjects - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Testing &amp; Quality](/categories/testing)
4. /
5. ravage84/phpunit-selenium2-pageobjects

AbandonedLibrary[Testing &amp; Quality](/categories/testing)

ravage84/phpunit-selenium2-pageobjects
======================================

PHPUnit Selenium2 PageObjects

020.1k1[4 issues](https://github.com/ravage84/phpunit-selenium2-pageobjects/issues)PHP

Since Nov 25Pushed 11y ago2 watchersCompare

[ Source](https://github.com/ravage84/phpunit-selenium2-pageobjects)[ Packagist](https://packagist.org/packages/ravage84/phpunit-selenium2-pageobjects)[ RSS](/packages/ravage84-phpunit-selenium2-pageobjects/feed)WikiDiscussions master Synced 1w ago

READMEChangelogDependenciesVersions (1)Used By (0)

PHPUnit Selenium2 PageObjects
=============================

[](#phpunit-selenium2-pageobjects)

[![Build Status @ Travis CI](https://camo.githubusercontent.com/44602da18d79ce470c7f0bc6c3b6f56e38e34dd0fff43069ef6c0a4aad3237f1/68747470733a2f2f7472617669732d63692e6f72672f72617661676538342f706870756e69742d73656c656e69756d322d706167656f626a656374732e7376673f6272616e63683d6d6173746572)](http://travis-ci.org/ravage84/phpunit-selenium2-pageobjects)

PageObjects is the idea of representing a webpage's services through an object, abstracting away the guts of Selenium and the page's structure.

You can (and should) read all about PageObjects here:

Additionally, this repository comes prepared with an example application and functional test:

Why
---

[](#why)

**You should apply good programming practices to testing. Tests are code. Bad code can contribute considerably to your technical debt. Tests should be DRY.**

Installation
============

[](#installation)

If you use Composer, simply add a dependency on `ravage84/phpunit-selenium2-pageobjects`to your project's `composer.json`.

```
{
    "require-dev": {
        "phpunit/phpunit": "3.7.*"
    }
}

```

Requirements
------------

[](#requirements)

- Composer
- PHP 5.3
- PHPUnit Selenium 1.3.x

Behavior
========

[](#behavior)

Getters and Setters
-------------------

[](#getters-and-setters)

You should define a getter and setter for each field for usage outside of your functional test. Never manually access the map, locators, or map keys outside of the PageObject.

Map
---

[](#map)

The map is defined using CSS selectors.

```
