Created
March 16, 2015 03:22
-
-
Save ek/322cfb3cb571e5e8e89b to your computer and use it in GitHub Desktop.
Error using usage snippet for x-ray-phantom
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
.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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 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