3 ms·
Can phantomJS be run as a daemon?
by boundlessdreamz 15y ago
Can phantomJS be run as a daemon?
- dkhenry 15y agoI don't think it works like that. You write scripts for it and can use it to excersize web pages. I have used it extensively to test web sites.
- boundlessdreamz 15y agoYeah. That's how I have used it. But it would be great if phantomjs can be launched as a daemon and then you pass a script for it to process. Or launch it with a script which runs forever and accepts input (phantomjs has an inbuilt web server). I think it ay be possible but wanted to know for sure.
- datakurre 15y agoI've been building a wrapper to enable PhantomJS as a "remote testing library" for RobotFramework (to do exactly what you described): https://github.com/datakurre/phantomrobot https://github.com/datakurre/phantomrobot (and http://code.google.com/p/robotframework/ http://code.google.com/p/robotframework/ for info about robot framework).
- boundlessdreamz 15y agoFrom a cursory look, it seems you use websocket to communicate with phantom. Neat!! Is there a minimal program available that shows this interaction?
- datakurre 15y agoYes, it uses xmlrpc (node-xmlrpc) for communication between RobotFramework and Node, and websockets (socket.io) for communication between Node and PhantomJS (which didn't bundle http-server when I started). I'm sorry to not have a separate websockets-example, but there's really nothing special in using websockets with phantom.
- meow 15y agoI usually use another controller program to launch it with required data..