Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to execute $.visit() #45

Open
nickylimjj opened this issue Jun 25, 2016 · 3 comments
Open

Unable to execute $.visit() #45

nickylimjj opened this issue Jun 25, 2016 · 3 comments

Comments

@nickylimjj
Copy link

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

@michaelcm
Copy link

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();
});

@fdaugs
Copy link

fdaugs commented Jul 1, 2016

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!

@travist
Copy link
Owner

travist commented Jul 1, 2016

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants