PHPackages                             dennisdigital/phantomjscontext - 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. dennisdigital/phantomjscontext

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

dennisdigital/phantomjscontext
==============================

Dennis PhantomJS Context.

1.0.1(8y ago)03.3kGPL-2.0+PHP

Since Oct 30Pushed 8y ago29 watchersCompare

[ Source](https://github.com/dennisinteractive/phantomjscontext)[ Packagist](https://packagist.org/packages/dennisdigital/phantomjscontext)[ RSS](/packages/dennisdigital-phantomjscontext/feed)WikiDiscussions master Synced yesterday

READMEChangelog (2)Dependencies (1)Versions (4)Used By (0)

phantomjscontext
================

[](#phantomjscontext)

phantomjscontext starts and stops PhantomJS before and after each scenario. It enables each site to use it's own port for running PhantomJS. It utilises dennisdigital/phantomjs-extension which is a driver for PhantomJS:

Usage
-----

[](#usage)

### In behat.yml:

[](#in-behatyml)

Add the context under contexts: `Behat\PhantomContext\Context\PhantomJsContext`

Add the extension under extensions: `Behat\PhantomJsExtension: ~`

Change `javascript_session` to `phantomjs`

Add the configuration replacing the port number with the site specific one:

```
phantomjs:
        bin: phantomjs2
        wd_port: 60301
        wd_host: http://localhost:60301/wd/hub

```

The site specific port numbers are available from google docs.

Example behat.yml:

```
     contexts:
        - FeatureContext:
        - Drupal\DrupalExtension\Context\MinkContext
        - Drupal\DrupalExtension\Context\RawDrupalContext
        - Behat\PhantomContext\Context\PhantomJsContext
        - Behat\BDDCommonExtension\Context\BDDCommonContext:
            parameters:
              screen_shot_path: %paths.base%/captured/screenshot
              screen_shot_url: %mink.base_url%/sites/carbuyer/tests/captured/screenshot
              html_path: %paths.base%/captured/html
              html_url: %mink.base_url%/sites/carbuyer/tests/captured/html
              drupal_users:
                drupal:
                  'drupal'
                behat_editor:
                  'editor3'
  extensions:
    Behat\PhantomJsExtension: ~
    Behat\MinkExtension:
      base_url: 'http://carbuyer.vm.didev.co.uk/'
      default_session: goutte
      javascript_session: phantomjs
      phantomjs:
        bin: phantomjs2
        wd_port: 60301
        wd_host: http://localhost:60301/wd/hub
      goutte: ~

```

### In composer.json

[](#in-composerjson)

Under require add `"dennisdigital/phantomjscontext": "1.0"`

###  Health Score

31

—

LowBetter than 68% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity16

Limited adoption so far

Community14

Small or concentrated contributor base

Maturity65

Established project with proven stability

 Bus Factor1

Top contributor holds 71.4% 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 ~0 days

Total

2

Last Release

3117d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/7585951?v=4)[dennisdigital](/maintainers/dennisdigital)[@dennisdigital](https://github.com/dennisdigital)

---

Top Contributors

[![tashaharrison](https://avatars.githubusercontent.com/u/4018999?v=4)](https://github.com/tashaharrison "tashaharrison (5 commits)")[![tariqinaam](https://avatars.githubusercontent.com/u/3472479?v=4)](https://github.com/tariqinaam "tariqinaam (2 commits)")

---

Tags

behat

### Embed Badge

![Health badge](/badges/dennisdigital-phantomjscontext/health.svg)

```
[![Health](https://phpackages.com/badges/dennisdigital-phantomjscontext/health.svg)](https://phpackages.com/packages/dennisdigital-phantomjscontext)
```

PHPackages © 2026

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