Answer the question
In order to leave comments, you need to log in
Why doesn't it enter the evaluate function in CasperJS?
Hello. There was a problem with CasperJS. Everything works until the moment when I want to fill a block on the page with text.
casper.thenOpen(url, function(){
this.echo(this.getCurrentUrl());
this.wait(5000, function() {
this.click('div.someElem');
});
});
casper.then(function(){
this.evaluate(function(){ //сюда не заходит
document.querySelector("div.anotherElem").innerHTML = someText;
});
});
Answer the question
In order to leave comments, you need to log in
Paste this code before starting
casper.on("resource.error", function(resourceError){
console.log('Unable to load resource (#' + resourceError.id + 'URL:' + resourceError.url + ')');
console.log('Error code: ' + resourceError.errorCode + '. Description: ' + resourceError.errorString);
});
var casper = require('casper').create({
verbose: true,
logLevel: 'debug',
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question