V
V
Vyacheslav Grachunov2017-03-18 23:36:25
Parsing
Vyacheslav Grachunov, 2017-03-18 23:36:25

Why does console.log cease to be displayed when external libraries are connected?

var page = require('webpage').create();
page.onConsoleMessage = function(msg) {
  console.log('Page title is ' + msg);
};
page.open('http://example.com', function(status) {
  // page.includeJs('https://ajax.googleapis.com/ajax/libs/jquery/3.1.1/jquery.min.js', function() {
    // page.includeJs('https://cdnjs.cloudflare.com/ajax/libs/jquery-scrollTo/2.1.0/jquery.scrollTo.min.js', function() {
 
      page.evaluate(function() {

        console.log('TRYYYYYYYY!!!!!')

        console.log(document.title);


      });
   

    // });
  // });
  phantom.exit();
});

Those. if i uncomment it doesn't work

Answer the question

In order to leave comments, you need to log in

1 answer(s)
V
Vyacheslav Grachunov, 2017-03-18
@Qwentor

All. phantom.exit(); works

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question