laurentj / slimerjs

A scriptable browser like PhantomJS, based on Firefox
http://slimerjs.org
Other
3k stars 259 forks source link

page.open never call callback #534

Open GerkinDev opened 7 years ago

GerkinDev commented 7 years ago

versions

I try to create a scrapper for some pages with casperJS, using the engine slimerjs. Links to explore are retrieved after a page I have to log in. Through SlimerJS exposed object in casperJs, I call

In CasperJS, this.page expose the engine object (slimerjs)
this.page.onResourceError = function(resourceError) {
    console.error(resourceError.url + ': ' + resourceError.errorString);
};
this.page.open(url, function(){
    console.log("This done");
    try{
        console.log('Opened ' + response.url);
    } catch(e){
        console.log(e+'');
    }
});

Actual results:

None. It stay stucked, never executing the callback

Expected results:

callback is executed

laurentj commented 7 years ago

It seems something fails with CasperJS. Is your script is complete here? If not, could you give the full source code of a minimal test case?