I want to have access to the file system on a page that runs using the PhantomJS browser without a browser.
I will catch an error when the JS code tries to interact with the file system
var fs = require('fs'); ... ReferenceError: Can't find variable: require
Is there any hack / plugin for PhantomJS that allows this?
PS I am using a headless test runner based on PhantomJS ( teaspoon ), and I want to save some data from the tests to the file system.
source share