2017 © Pedro Peláez
 

library phantomjsstarter

Starts phantomjs sessions with webdriver support

image

mazelab/phantomjsstarter

Starts phantomjs sessions with webdriver support

  • Tuesday, May 16, 2017
  • by jensklose
  • Repository
  • 5 Watchers
  • 1 Stars
  • 5,736 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 1 Forks
  • 1 Open issues
  • 8 Versions
  • 7 % Grown

The README.md

PhantomJS Starter

PHP helper class to start phantomjs sessions on demand. You could use it in functional test frameworks like behat/mink., (*1)

License

The phantomjsstarter is open-sourced software licensed under the MIT license, (*2)

Installation

composer require mazelab/phantomjsstarter --dev, (*3)

    "require-dev": {
        "mazelab/phantomjsstarter": "^1.0"
    }

API

The Starter constructor accepts the following parameters:, (*4)

  • $port - webdriver port number which is passed to the --webdriver option
  • $options - other additional options. Defaults to --proxy-type=none --ignore-ssl-errors=true
  • $phantomJsPath - path to the phantomjs executable. Defaults to global phantomjs

Example

A FeatureContext file could look like this, (*5)

    class FeatureContext extends MinkContext
    {
        /** @BeforeSuite */
        public static function setup(SuiteEvent $event)
        {
            // this will set the port
            $phantomjs = new Mazelab\Phantomjs\Starter(8643);
            $phantomjs->up();
        }

        /** @BeforeSuite */
        public static function setup2(SuiteEvent $event)
        {
            // this will set the port and tells the starter
            // to use the binary from node_modules/.bin
            $phantomjs = new Mazelab\Phantomjs\Starter(8643, null, 'node_modules/.bin/phantomjs');
            $phantomjs->up();
        }
        ...

And then your config file behat.yml, (*6)

    default:
        context:
            class:  'FeatureContext'
        formatter:
            name:               pretty
            parameters:
                output_path:    null
        extensions:
            Behat\MinkExtension\Extension:
                default_session: selenium2
                javascript_session: selenium2
                base_url: 'https://dev.myproject.com'
                selenium2:
                    wd_host: "http://localhost:8643/wd/hub"

The Versions

16/05 2017

dev-master

9999999-dev

Starts phantomjs sessions with webdriver support

  Sources   Download

MIT

The Requires

 

by Jens Klose
by Thomas Lauf
by Andrey Stukalin

16/05 2017

1.3.0

1.3.0.0

Starts phantomjs sessions with webdriver support

  Sources   Download

MIT

The Requires

 

by Jens Klose
by Thomas Lauf
by Andrey Stukalin

16/05 2017

1.2.0

1.2.0.0

Starts phantomjs sessions with webdriver support

  Sources   Download

MIT

The Requires

 

by Jens Klose
by Thomas Lauf
by Andrey Stukalin

21/12 2015

1.1.2

1.1.2.0

Starts phantomjs sessions with webdriver support

  Sources   Download

MIT

The Requires

 

by Jens Klose
by Thomas Lauf

16/12 2015

1.1.1

1.1.1.0

Starts phantomjs sessions with webdriver support

  Sources   Download

MIT

The Requires

 

by Jens Klose
by Thomas Lauf

06/05 2015

1.1.0

1.1.0.0

Starts phantomjs sessions with webdriver support

  Sources   Download

MIT

The Requires

 

by jens.klose

03/04 2014

1.0.1

1.0.1.0

Starts phantomjs sessions with webdriver support

  Sources   Download

MIT

The Requires

 

by jens.klose

11/03 2014

1.0.0

1.0.0.0

Starts phantomjs sessions with webdriver support

  Sources   Download

MIT

The Requires

 

by jens.klose