2017 © Pedro Peláez
 

project phantomjscontext

Dennis PhantomJS Context.

image

dennisdigital/phantomjscontext

Dennis PhantomJS Context.

  • Monday, October 30, 2017
  • by dennisdigital
  • Repository
  • 14 Watchers
  • 0 Stars
  • 2,929 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 4 Versions
  • 27 % Grown

The README.md

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: https://github.com/dennisinteractive/PhantomJs-Extension, (*1)

Usage

In behat.yml:

Add the context under contexts: Behat\PhantomContext\Context\PhantomJsContext, (*2)

Add the extension under extensions: Behat\PhantomJsExtension: ~, (*3)

Change javascript_session to phantomjs, (*4)

Add the configuration replacing the port number with the site specific one:, (*5)

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

The site specific port numbers are available from google docs., (*6)

Example behat.yml:, (*7)

     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

Under require add "dennisdigital/phantomjscontext": "1.0", (*8)

The Versions

30/10 2017

dev-master

9999999-dev

Dennis PhantomJS Context.

  Sources   Download

GPL-2.0+

The Requires

 

30/10 2017

1.0.1

1.0.1.0

Dennis PhantomJS Context.

  Sources   Download

GPL-2.0+

The Requires

 

30/10 2017

dev-28812_add_packagist

dev-28812_add_packagist

Dennis PhantomJS Context.

  Sources   Download

GPL-2.0+

The Requires

 

30/10 2017

v1.0

1.0.0.0

Dennis PhantomJS Context.

  Sources   Download

GPL-2.0+

The Requires