Skip to content

Instantly share code, notes, and snippets.

@ek
Created March 16, 2015 03:22
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ek/322cfb3cb571e5e8e89b to your computer and use it in GitHub Desktop.
Save ek/322cfb3cb571e5e8e89b to your computer and use it in GitHub Desktop.
Error using usage snippet for x-ray-phantom
.use(phantom())
^
TypeError: object is not a function
at Object.<anonymous> (/Users/212341175/workspace/repos/kexp/xray.js:5:8)
at Module._compile (module.js:460:26)
at Object.Module._extensions..js (module.js:478:10)
at Module.load (module.js:355:32)
at Function.Module._load (module.js:310:12)
at Function.Module.runMain (module.js:501:10)
at startup (node.js:129:16)
at node.js:814:3
// usage snippet from:
// https://github.com/lapwinglabs/x-ray-phantom
xray = require('x-ray');
phantom = require('phantom');
var options = {};
xray('http://google.com')
.use(phantom())
.type('input', 'x-ray')
.click('.search')
.select([{
$root: '.result',
title: '.title',
link: 'a[href]'
}])
.write('out.json');
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment