jquery.go.js icon indicating copy to clipboard operation
jquery.go.js copied to clipboard

Unable to execute $.visit()

Open nickylimjj opened this issue 9 years ago • 3 comments

I am unable to visit the webpage i indicated in $.visit(url, function). I read earlier issues to use phantom v1.0.0 instead but to no avail. Any solutions? Thanks

nickylimjj avatar Jun 25 '16 08:06 nickylimjj

Hello, I'm running into exactly the same situation here. Attempting to give jquerygo a try, but it never makes it past visit. The script seems to exit immediately but nothing is printed out. I was trying both with and without async. Here's a minimal code snippet I'd expect to work:

var $ = require('jquerygo'),
  async = require('async');

var print = function(text) {
  return function(done) {
    console.log(text);
    done();
  };
};

var url = 'http://localhost';
async.series([
  print('Opening URL: ' + url),
  $.go('visit', url),
  print('Done opening URL')
], function() {
  $.close();
});

Here is the terminal command and output, just that one line then it exits with exit code 0.

$ node app.js
Opening URL: http://localhost

It looks to be using these versions:

  • jqerygo 0.0.16
  • phantom 2.1.9
  • phantomjs 1.9.20

Any ideas? I'm really stumped. Even the standard code block doesn't work either - no output after command run. localhost is a basic landing page with no redirects or anything.

$.visit('http://localhost', function() {
  console.log('You have visited the page!');
  $.close();
});

michaelcm avatar Jun 29 '16 19:06 michaelcm

Same for me. $.visit(url, function) seems not to be working at all.

The Basic Setup:

var $ = require('jquerygo');
$.visit('http://localhost', function() {
  console.log('I was here!');
  $.close();
});

Nothing happens. Neither an error nor a log.

I also tried older versions of phantom and phantonjs but nothing solved the problem!

fdaugs avatar Jul 01 '16 15:07 fdaugs

Hey guys... sorry you are having problems with this library. I wrote it a long time ago and have not spent time to look into the issues and probably do not have time to debug them. I would recommend using other tools like Casper.js.

travist avatar Jul 01 '16 19:07 travist