Custom casperjs modules
问题 I've extended my casperjs to use some new methods like this one : casper.getTxt = function(selector) { if(this.exists(selector)) { return this.getHTML(selector); } else { return ''; } }; I've to add these functions on every script that I write. so I made a new file custom.js on the same location where other modules( colorizer.js , mouse.js etc) were placed. custom.js has following code : var require = patchRequire(require); var casper = require('casper').create(); var getTxt = function