Commit de1a0348 de1a0348bcf5b63021914958e8f1fbded16a6908 by Nicolas Perriault

fixed error on Casper#captureSelector and Casper#fill

1 parent ad4f403f
......@@ -130,7 +130,7 @@
* @return Casper
*/
captureSelector: function(targetFile, selector) {
return this.capture(targetFile, self.evaluate(function() {
return this.capture(targetFile, this.evaluate(function() {
try {
return document.querySelector(selector).getBoundingClientRect();
} catch (e) {
......@@ -332,7 +332,7 @@
}
// Form submission?
if (submit === true) {
self.evaluate(function() {
this.evaluate(function() {
var form = document.querySelector('%selector%');
console.log('submitting form to ' + (form.getAttribute('action') || "unknown")
+ ', HTTP ' + (form.getAttribute('method').toUpperCase() || "GET"));
......
......@@ -12,7 +12,8 @@ function getLinks() {
var links = [];
var casper = new phantom.Casper({
logLevel: "info", // we only want "info" or higher level log messages
faultTolerant: false,
logLevel: "debug", // we only want "info" or higher level log messages
loadImages: false, // do not download images to save bandwidth
loadPlugins: false, // do not load plugins to save kitten
verbose: true // write log messages to the console
......