Questions tagged [spookyjs]

SpookyJS makes it possible to drive CasperJS suites from Node.js. At a high level, Spooky accomplishes this by spawning Casper as a child process and controlling it via RPC.

SpookyJS makes it possible to drive CasperJS suites from Node.js. At a high level, Spooky accomplishes this by spawning Casper as a child process and controlling it via RPC.

Specifically, each Spooky instance spawns a child Casper process that runs a bootstrap script. The bootstrap script sets up a JSON-RPC server that listens for commands from the parent Spooky instance over a transport (either HTTP or stdin). The script also sets up a JSON-RPC client that sends events to the parent Spooky instance via stdout.

Source: https://github.com/WaterfallEngineering/SpookyJS

See also:

62 questions
1
vote
1 answer

SpookyJS has no Start Method while using it in Meteor

I have an weird error and can't find the cause of it for the last few hours... I have a meteor app, that scrapes some webpages for information and everything works fine as long as I use reuqest and cheerio for static pages, but now I have a dynamic…
Carnivean
  • 51
  • 5
1
vote
1 answer

All XPaths return a non-existent error in CasperJS?

Just to be clear I am using SpookyJS which is a library that allows for a headless CasperJS. I am able to click and select other XPaths just fine on all other pages,the problem is only on a particular page, the page loads perfectly but all of the…
grasshopper
  • 918
  • 4
  • 13
  • 29
1
vote
1 answer

How to inject script in SpookyJS?

I am trying to inject punycode script in my SpookyJS program. But it is not working. try { var Spooky = require('spooky'); } catch (e) { var Spooky = require('../lib/spooky'); } var spooky = new Spooky({ child: { transport:…
vinayr
  • 11,026
  • 3
  • 46
  • 42
1
vote
0 answers

SpookyJS hangs if there is any non-english characters in spooky.then()

SpookyJS hangs if there are any international characters inside spooky.then function. try { var Spooky = require('spooky'); } catch (e) { var Spooky = require('../lib/spooky'); } var spooky = new Spooky({ child: { transport:…
vinayr
  • 11,026
  • 3
  • 46
  • 42
1
vote
1 answer

How to respond to requests on completion of a SpookyJS script?

I need to periodically login and scrape some data from a particular site. I wrote a CasperJS script to run on Heroku in order to take care of it. Here is what I want to be able to do: app.get('/test', function(request, response) { …
dsp_099
  • 5,801
  • 17
  • 72
  • 128
1
vote
1 answer

How can I spawn a new process and quit from a node.js script?

I have a nodeJS command line script which interacts with a website using phantomJS via casperJS/spookyJS. A redirect event is stopping my process from working correctly. How would I respond to the redirect, spawn a new process and kill the process…
codecowboy
  • 9,835
  • 18
  • 79
  • 134
1
vote
1 answer

can I run the hello.js example for spookyjs on nitrous.io?

Here are the exact steps I took to try to run the hello.js example for spooky js on nitrous. 1. I installed phantomjs, nodejs(already installed), and casperjs. $ npm install -g casperjs Casper warns me that While CasperJS is installable via npm,…
user1754830
  • 81
  • 1
  • 1
  • 7
1
vote
0 answers

Node.js SpookyJS: error executing hello.js

I have installed SpookyJS to execute CasperJs commands in Node.js. I Installed it with this command: npm install spooky, I´m using a Centos machine. the error: $ node node_modules/spooky/examples/hello.js events.js:72 throw er; // Unhandled…
user3206686
  • 11
  • 1
  • 4
1
vote
0 answers

How to use thenClick() with spookyJS

In a casperJS script I am doing this: casper.then(function() { this.test.assertExists({ type: 'xpath', path: '//*[@id="wrapper"]/div[1]/div[3]/div/p/a[text()="A button"]' }, "Got Here"); }); casper.then(function() { …
codecowboy
  • 9,835
  • 18
  • 79
  • 134
1
vote
0 answers

SpookyJS: Extra Then Required After Filling Forms

The CasperJS Quickstart Guide has this example on filling out a form: casper.start('http://google.fr/', function() { // search for 'casperjs' from google form this.fill('form[action="/search"]', { q: 'casperjs' },…
A. Duff
  • 4,097
  • 7
  • 38
  • 69
1
vote
1 answer

PhantomJS dropping cookies on 302 redirect

I'm using the SpookyJS node library to walk through a web flow. Some of the cookies that I'm supposed to have aren't being set on a 302 redirect. Is there any knowledge as to whether this is a PhantomJS or SpookyJS problem?
maxko87
  • 2,892
  • 4
  • 28
  • 43
0
votes
1 answer

Impossible to install spookyjs

I want to install spookyjs and find it impossible to do so. I've tried three different ways: Run the standard spookyjs package.json provided in spookyjs github. Then I try to run hello.js and I am greeted with this error. …
user1584421
  • 3,499
  • 11
  • 46
  • 86
0
votes
2 answers

Using CasperJS within a regular JavaScript file

I am trying to create a NodeJS program that utilizes CasperJS within it. I have run into the error that the module 'casper' cannot be found. As a result, I have tried to npm install spooky --save as I have read around that it is a driver, but I am…
Gabe Gomez
  • 81
  • 2
  • 11
0
votes
1 answer

spookyjs hello.js can't recognize module tiny-jsonrpc

I have copied example code from spookyjs npm web-page: try { var Spooky = require('spooky'); } catch (e) { Spooky = require('node_modules/spooky'); } var spooky = new Spooky({ child: { transport: 'http' }, …
0
votes
1 answer

How to pass Parameter to spooky in nodejs

I'm trying to send the parametter countryCode to spookyjs function. My question is how to do this , because when I wanna use the countryCode inside spooky.then(function) the countryCode is empty thank you a lot This is the call code var…
Kargol
  • 113
  • 9