{"author":{"name":"Rob Schieber","email":"rob.schieber@gmail.com","url":"https://twitter.com/sheebz"},"bugs":{"mail":"rob.schieber@gmail.com","url":" https://github.com/sheebz/phantom-proxy/issues"},"dependencies":{"colors":"~0.6.0-1","form-data":"~0.0.3","mime":"~1.2.7","q":"~0.8.8","underscore":"~1.4.0"},"description":"a lightweight proxy that lets you to drive phantomjs from node.","devDependencies":{"cucumber":">0.0.0","mocha":"~1.5.0","should":"~1.2.0","jshint":"latest"},"directories":{"example":"./example","lib":"./lib","test":"./test"},"engines":{"node":">0.6.0"},"keywords":["phantom","driver","node","phantomjs","BDD","automated","testing","DOM","JSDOM","zombie","zombiejs","phantom-node","node-phantom","feature","test","headless","webkit","cucumber"],"licenses":[{"type":"MIT","url":"https://github.com/sheebz/phantom-proxy/blob/master/README.md"}],"main":"index.js","name":"phantom-proxy","private":false,"repository":{"type":"git","url":"https://github.com/sheebz/phantom-proxy"},"version":"0.1.2","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\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            phantomProxy.end();\n        });\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## FAQ\n### Why do we need another nodejs runtime for phantom?\nThe short answer is that phantom-proxy has a better implementation.  Other drivers seem to use a side effect of alerts to communicate with phantomjs, which unfortunately is not a good long term solution. Also all the other libraries I have seen do not have a fully implemented the evaluate function - you can't pass additional arguments to the client side function.  This is a big problem and was the main motivation for creating this package.\n\n## Revision History\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","_id":"phantom-proxy@0.1.2","dist":{"shasum":"97677411d963be91663cbfc78b654844e80e5db3","tarball":"http://registry-npm.ywwl.com/phantom-proxy/download/phantom-proxy-0.1.2.tgz","integrity":"sha512-g9/66t84/xvy1wUbBDKqFG73rn6/XzgoQu0Fw2wnGTaYC427TIXvvZfIIMKjeqIQvQceGaINxIIJTrVPJcUgNw==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIBl6d8GwOOWHD607e2+vjUuN6dBs7ysek/QMzhvVu5/SAiBhPC2CgVdnlTVKgfys4qf1enca0DZmXB8jAmr97pfpLw=="}],"size":29548,"noattachment":false,"key":"/phantom-proxy/-/phantom-proxy-0.1.2.tgz"},"_npmVersion":"1.1.62","_npmUser":{"name":"sheebz","email":"rob.schieber@gmail.com"},"maintainers":[{"name":"sheebz","email":"rob.schieber@gmail.com"}],"publish_time":1350833155588,"_cnpm_publish_time":1350833155588,"dist-tags":{"latest":"0.1.792"}}