{"id":18720490,"url":"https://github.com/dennisinteractive/phantomjscontext","last_synced_at":"2025-11-10T21:30:17.490Z","repository":{"id":56965704,"uuid":"108430846","full_name":"dennisinteractive/phantomjscontext","owner":"dennisinteractive","description":"Dennis PhantomJS Context","archived":false,"fork":false,"pushed_at":"2017-12-07T15:29:01.000Z","size":7,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":30,"default_branch":"master","last_synced_at":"2024-12-28T11:28:25.438Z","etag":null,"topics":["behat"],"latest_commit_sha":null,"homepage":null,"language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/dennisinteractive.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2017-10-26T15:33:12.000Z","updated_at":"2018-07-10T14:01:38.000Z","dependencies_parsed_at":"2022-08-21T11:20:16.244Z","dependency_job_id":null,"html_url":"https://github.com/dennisinteractive/phantomjscontext","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dennisinteractive%2Fphantomjscontext","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dennisinteractive%2Fphantomjscontext/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dennisinteractive%2Fphantomjscontext/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dennisinteractive%2Fphantomjscontext/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dennisinteractive","download_url":"https://codeload.github.com/dennisinteractive/phantomjscontext/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":239583704,"owners_count":19663252,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["behat"],"created_at":"2024-11-07T13:31:18.037Z","updated_at":"2025-11-10T21:30:17.421Z","avatar_url":"https://github.com/dennisinteractive.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# phantomjscontext\n\nphantomjscontext 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\n\n## Usage\n\n### In behat.yml:\nAdd the context under contexts: `Behat\\PhantomContext\\Context\\PhantomJsContext`\n\nAdd the extension under extensions: `Behat\\PhantomJsExtension: ~`\n\nChange `javascript_session` to `phantomjs`\n\nAdd the configuration replacing the port number with the site specific one: \n```\nphantomjs:\n        bin: phantomjs2\n        wd_port: 60301\n        wd_host: http://localhost:60301/wd/hub\n```\nThe site specific port numbers are available from google docs.\n\nExample behat.yml: \n``` \n     contexts:\n        - FeatureContext:\n        - Drupal\\DrupalExtension\\Context\\MinkContext\n        - Drupal\\DrupalExtension\\Context\\RawDrupalContext\n        - Behat\\PhantomContext\\Context\\PhantomJsContext\n        - Behat\\BDDCommonExtension\\Context\\BDDCommonContext:\n            parameters:\n              screen_shot_path: %paths.base%/captured/screenshot\n              screen_shot_url: %mink.base_url%/sites/carbuyer/tests/captured/screenshot\n              html_path: %paths.base%/captured/html\n              html_url: %mink.base_url%/sites/carbuyer/tests/captured/html\n              drupal_users:\n                drupal:\n                  'drupal'\n                behat_editor:\n                  'editor3'\n  extensions:\n    Behat\\PhantomJsExtension: ~\n    Behat\\MinkExtension:\n      base_url: 'http://carbuyer.vm.didev.co.uk/'\n      default_session: goutte\n      javascript_session: phantomjs\n      phantomjs:\n        bin: phantomjs2\n        wd_port: 60301\n        wd_host: http://localhost:60301/wd/hub\n      goutte: ~\n```\n      \n### In composer.json\n\nUnder require add `\"dennisdigital/phantomjscontext\": \"1.0\"`\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdennisinteractive%2Fphantomjscontext","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdennisinteractive%2Fphantomjscontext","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdennisinteractive%2Fphantomjscontext/lists"}