PHPackages                             manifesto/behat-contexts - 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. manifesto/behat-contexts

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

manifesto/behat-contexts
========================

Extension for Mink/Drupal contexts

v0.2(9y ago)0146GPL-2.0PHP

Since Feb 29Pushed 9y ago10 watchersCompare

[ Source](https://github.com/Manifesto-Digital/behat-contexts)[ Packagist](https://packagist.org/packages/manifesto/behat-contexts)[ RSS](/packages/manifesto-behat-contexts/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (1)Dependencies (1)Versions (3)Used By (0)

\#Behat Additional Contexts

This package extends the basic contexts and step definitions provided with Mink and Drupal contexts. Additionally creates an HTML dump and a Screenshot on a failure, make debugging easier.

\##How to Install composer require gambry/behat-contexts:\* composer update

\##How to use

You'll find these additional definitions:

\###GeneralContext

> take a screenshot

Takes a screenshot of the current session/page state

> I wait for "X" seconds

Wait "X" seconds before executing the next step

> I focus on "element"

Set the focus on the element, clicking on it. \[requires javascript api\]

```
jQuery( ":contains('element')" ).click()
```

> I fill in "field" with "value" plus random data

It tries to create a unique value to be submitted, appending some random data to the specified value

> I select "option" from "select" with javascript

> I check "checkbox/label" with javascript

Selects/Checks elements with javascript, avoiding selenium2d errors about element not being available and it's also form-elements-javascript-libraries friendly (Chosen.js, Bootstrap, customSelect, etc.) \[requires javascript api\]

\###DrupalContext

> I am logged in as a user with the "role" role(s) on this site

> I am an anonymous user on this site

> I am not logged in on this site

> I am logged in as :name on this site

Due [this issue](https://github.com/jhedstrom/drupalextension/pull/131) if you don't have a Logout link on the homepage Drupal Driver doens't understand if the user is loggedin or not. These definitions fix that problem giving you the possibility to define the path where the driver can find the Logout link: define the constant *BDD\_DRUPAL\_LOGGEDIN\_PATH* in order to set your custom path (i.e.: "/user", default is "/")

> I am logged in as :name with password :pass

It logs in the specific user with his/her specific password

> I should see the "element" form element

> I should not see the "element" form element

Using Fields Dependencies or Form API states some elements are visible only after certain conditions. These definitions check the visibility of the element. \[requires javascript api\]

\###HTML dump and Screenshot To define the path for **dumps/** and **screenshots/** folders define the constant *BDD\_REPORT\_PATH* (default "./")

###  Health Score

26

—

LowBetter than 43% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity10

Limited adoption so far

Community12

Small or concentrated contributor base

Maturity54

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 90% 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 ~100 days

Total

2

Last Release

3625d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/b38551e91ac2d6092adcfbcb99f3e9b79ce9c3c1b855e82e3e044819ca0db76a?d=identicon)[manifesto](/maintainers/manifesto)

---

Top Contributors

[![gambry](https://avatars.githubusercontent.com/u/11092878?v=4)](https://github.com/gambry "gambry (9 commits)")[![tryptyx](https://avatars.githubusercontent.com/u/5392282?v=4)](https://github.com/tryptyx "tryptyx (1 commits)")

### Embed Badge

![Health badge](/badges/manifesto-behat-contexts/health.svg)

```
[![Health](https://phpackages.com/badges/manifesto-behat-contexts/health.svg)](https://phpackages.com/packages/manifesto-behat-contexts)
```

###  Alternatives

[acquia/drupal-spec-tool

A tool for specifying Drupal architecture details and generating automated tests for them

1532.6M3](/packages/acquia-drupal-spec-tool)[drevops/behat-steps

Collection of steps for Behat

25381.7k3](/packages/drevops-behat-steps)[nuvoleweb/drupal-behat

Drupal Behat extension.

33787.7k3](/packages/nuvoleweb-drupal-behat)[drupal/tqextension

Behat extension for testing Drupal sites

1134.4k](/packages/drupal-tqextension)

PHPackages © 2026

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