PHPackages                             goez/mink-page-objects - 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. [Utility &amp; Helpers](/categories/utility)
4. /
5. goez/mink-page-objects

AbandonedArchivedPackage[Utility &amp; Helpers](/categories/utility)

goez/mink-page-objects
======================

Implementation of Page Objects Pattern for Mink

0.3.3(10y ago)24.5k1[1 PRs](https://github.com/jaceju/mink-page-objects/pulls)MITPHP

Since Oct 30Pushed 10y agoCompare

[ Source](https://github.com/jaceju/mink-page-objects)[ Packagist](https://packagist.org/packages/goez/mink-page-objects)[ RSS](/packages/goez-mink-page-objects/feed)WikiDiscussions master Synced today

READMEChangelogDependencies (5)Versions (13)Used By (0)

Page Objects Pattern for Mink
=============================

[](#page-objects-pattern-for-mink)

[![Build Status](https://camo.githubusercontent.com/b5677d14d2116b30c28c5bd2aaa418a38882dac9708bdcb393e946ca21df08a1/68747470733a2f2f7472617669732d63692e6f72672f6a6163656a752f6d696e6b2d706167652d6f626a656374732e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/jaceju/mink-page-objects)

Alpha version

Install
-------

[](#install)

```
$ composer require goez/mink-page-objects --dev
```

Usage
-----

[](#usage)

Creating a page class for Google homepage:

```
use Goez\PageObjects\Page;

class Home extends Page
{
    protected $elements = [
        'SearchForm' => ['css' => 'form'],
    ];

    public function search($keyword)
    {
        return $this->getPart(SearchForm::class)
            ->search($keyword);
    }
}
```

Create a page class for searched result:

```
use Goez\PageObjects\Page;

class SearchResult extends Page
{
}
```

Creating an element object for searching form:

```
use Goez\PageObjects\Part;

class SearchForm extends Part
{
    /**
     * @param $keyword
     * @return SearchResult
     * @throws \Behat\Mink\Exception\ElementNotFoundException
     */
    public function search($keyword)
    {
        $this->element->fillField('q', $keyword);
        $this->element->submit();

        return $this->createPage(SearchResult::class);
    }
}
```

Instantiating a page object and verify keyword searching:

```
use Behat\Mink\Driver\Selenium2Driver;
use Behat\Mink\Session;
use Goez\PageObjects\Context;

class GoogleSearchTest extends PHPUnit_Framework_TestCase
{
    // Install phantomjs first
    // and you can use this trait
    // for starting phantonjs automatically
    use PhantomJSRunner;

    public function testSearchWithKeyword()
    {
        $driver = new Selenium2Driver('phantomjs');

        $session = new Session($driver);
        $session->start();

        $context = new Context($session, [
            'baseUrl' => 'https://www.google.com',
        ]);

        $context->createPage(Home::class)
            ->open()
            ->search('example')
            ->shouldContainText('Example Domain');
    }
}
```

License
-------

[](#license)

MIT

###  Health Score

30

—

LowBetter than 62% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity21

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity60

Established project with proven stability

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~1 days

Total

12

Last Release

3881d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/000012ed8f10873694d29e2f60b7b71171c088d6fd655a695210dd2fe46172b9?d=identicon)[jaceju](/maintainers/jaceju)

---

Top Contributors

[![jaceju](https://avatars.githubusercontent.com/u/310474?v=4)](https://github.com/jaceju "jaceju (75 commits)")

### Embed Badge

![Health badge](/badges/goez-mink-page-objects/health.svg)

```
[![Health](https://phpackages.com/badges/goez-mink-page-objects/health.svg)](https://phpackages.com/packages/goez-mink-page-objects)
```

###  Alternatives

[pestphp/pest

The elegant PHP Testing Framework.

11.6k72.2M20.5k](/packages/pestphp-pest)[drupal/core-dev

require-dev dependencies from drupal/drupal; use in addition to drupal/core-recommended to run tests from drupal/core.

2022.6M343](/packages/drupal-core-dev)[civicrm/civicrm-core

Open source constituent relationship management for non-profits, NGOs and advocacy organizations.

751291.4k43](/packages/civicrm-civicrm-core)[ec-europa/toolkit

Toolkit packaged for Drupal projects based on Robo.

40252.8k34](/packages/ec-europa-toolkit)[drevops/behat-steps

Collection of steps for Behat

27431.3k4](/packages/drevops-behat-steps)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
