{"bugs":{"url":" https://github.com/sheebz/phantom-proxy/issues","mail":"rob.schieber@gmail.com"},"dist":{"shasum":"7a98ccd3830626840673d35f147a7e123f8daa04","tarball":"https://registry.npmjs.org/phantom-proxy/-/phantom-proxy-0.1.62.tgz","integrity":"sha512-4sxc+z3Y4sCkeVS0yUyEqEzV5j5j41mYbrtzt/XVLUDNzR3kZ7OntLjZpQXp8MJO9ILFS4Z6P1ZWYDrfT8GzLw==","signatures":[{"sig":"MEUCIH764dPrsPxI2/7+Lu0LLiOd6E3PXPozzZpfIl9CS+6sAiEAvSAEExFyOSv7Np+yWThAa8nj9a8D0O6GqRK9SbKEzO8=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}]},"main":"index.js","name":"phantom-proxy","author":{"url":"https://twitter.com/sheebz","name":"Rob Schieber","email":"rob.schieber@gmail.com"},"readme":"# phantom-proxy\n* Allows you to drive [phantomjs](www.phantomjs.org) from [node](www.nodejs.org)\n* Does not rely on alert side effects for communicating with phantomjs\n* Uses Phantom's embedded mongoose web server for communication - more efficient, simpler, faster.\n* Provides a full api - including a parametrized evaluate function - no more hard coded strings\n* Provides additional useful methods such as waitForSelector\n* Can easily integrate with feature testing frameworks such as [cucumber](https://github.com/cucumber/cucumber-js), jasmine, mocha\n\n## Overview\nPhantomJs is an incredibly useful tool for functional and unit testing.  PhantomJs runs in its own process, making it difficult to drive from node.  Phantom-proxy solves this problem, allowing you to fully drive phantomjs from node.\n\n## Installation\n\n`npm install phantom-proxy`\n\n## Usage\n### Examples\nNavigate to web page and check for body page\n```javascript\nvar phantomProxy = require('phantom-proxy');\n\nphantomProxy.create({}, function (proxy) {\n    var page = proxy.page;\n    page.open('http://www.w3.org', function () {\n        page.waitForSelector('body', function () {\n            console.log('body tag present');\n            proxy.end();\n        });\n    });\n\n});\n```\n\nSame example but, checking for a body tag and rendering a snapshot.\n```javascript\n            phantomProxy.create({\"debug\":true}, function (proxy) {\n                proxy.page.open('http://www.w3.org', function (result) {\n                    assert.equal(result, true);\n                    proxy.page.waitForSelector('body', function (result) {\n                        assert.equal(result, true);\n                        proxy.page.render('./scratch/scratch.png', function (result) {\n                            assert.equal(result, true);\n                            proxy.end(function () {\n                              console.log('done');\n                            });\n                        });\n                    }, 1000);\n                });\n            });\n            ```\n\n\nSee the [API](https://github.com/sheebz/phantom-proxy/blob/master/api.md) documentation for more usage information.\n\n## Revision History\n* 2012-11-06 - version 0.1.6\n - reworked event communication interface - no longer using stdoutput to pass event messages\n - reworked process creation and exit logic\n* 2012-11-03 - version 0.1.3\n  - added callback parameter to end method on proxy.\n  - removed unref call in proxy\n  - added debug option\n* 2012-10-22 - version 0.1.2\n  - breaking - changed the way events are consumed, switched to using nodes emmitter to brodcast events as opposed to invoking instance methods on the object.  To fix issues, use [object].on('eventname') style syntax.\n  - Code clean up\n* 2012-10-17 - version 0.1.16\n   - fixed waitforSelector issue\n* 2012-10-12  - version 0.1.15\n    - fixed a problem w/ waitforSelector fn.\n    - fixed problem where process wasn't shutting down existing server.\n* version 0.1.13\n  - added args property handling for phantom object\n  - added ability to specify port for rpc channel\n  - added timeout on waitforSelector function\n  - added ability to pass cmd line arguments for phantom via options object\n* version 0.1.10\n  - cleaned up and reorganized code\n  - added unit tests\n  - fixed process related issues\n\n","engines":{"node":">0.6.0"},"private":false,"_npmUser":{"name":"sheebz","email":"rob.schieber@gmail.com"},"keywords":["phantomjs","phantom","cucumber","cucumberjs","feature","testing"],"licenses":[{"url":"https://github.com/sheebz/phantom-proxy/blob/master/README.md","type":"MIT"}],"repository":{"url":"https://github.com/sheebz/phantom-proxy","type":"git"},"_npmVersion":"1.1.62","description":"a lightweight proxy that lets you to drive phantomjs from node.","directories":{"lib":"./lib","test":"./test","example":"./example"},"maintainers":[{"name":"sheebz","email":"rob.schieber@gmail.com"}],"dependencies":{"q":"~0.8.8","mime":"~1.2.7","colors":"~0.6.0-1","form-data":"~0.0.3","underscore":"~1.4.0"},"devDependencies":{"mocha":"~1.5.0","jshint":"latest","should":"~1.2.0","cucumber":">0.0.0","event-stream":">=3.0.7"},"_id":"phantom-proxy@0.1.62","version":"0.1.62"}