lapwinglabs / x-ray-phantom

phantom driver for x-ray.
112 stars 30 forks source link

.use instead of .driver #6

Open harlantwood opened 9 years ago

harlantwood commented 9 years ago

When I tried the example, it told me "no method .driver()". I used the .use() form from the https://github.com/lapwinglabs/x-ray README and it worked fine. Caveat: I'm new here, and it's possible I was doing it wrong. :wink:

harlantwood commented 9 years ago

node v0.10.38, and:

├─┬ x-ray@1.0.5
│ ├── catch-stdout@0.0.1
│ ├─┬ cheerio@0.17.0
│ │ ├─┬ CSSselect@0.4.1
│ │ │ ├── CSSwhat@0.4.7
│ │ │ └─┬ domutils@1.4.3
│ │ │   └── domelementtype@1.3.0
│ │ ├─┬ dom-serializer@0.0.1
│ │ │ └── domelementtype@1.1.3
│ │ ├── entities@1.1.1
│ │ ├─┬ htmlparser2@3.7.3
│ │ │ ├── domelementtype@1.3.0
│ │ │ ├── domhandler@2.2.1
│ │ │ ├── domutils@1.5.1
│ │ │ ├── entities@1.0.0
│ │ │ └─┬ readable-stream@1.1.13
│ │ │   ├── core-util-is@1.0.1
│ │ │   ├── inherits@2.0.1
│ │ │   ├── isarray@0.0.1
│ │ │   └── string_decoder@0.10.31
│ │ └── lodash@2.4.2
│ ├─┬ debug@2.2.0
│ │ └── ms@0.7.1
│ ├── object-assign@2.0.0
│ ├─┬ superagent@0.21.0
│ │ ├── component-emitter@1.1.2
│ │ ├── cookiejar@2.0.1
│ │ ├── extend@1.2.1
│ │ ├─┬ form-data@0.1.3
│ │ │ ├── async@0.9.2
│ │ │ └─┬ combined-stream@0.0.7
│ │ │   └── delayed-stream@0.0.5
│ │ ├── formidable@1.0.14
│ │ ├── methods@1.0.1
│ │ ├── mime@1.2.11
│ │ ├── qs@1.2.0
│ │ ├─┬ readable-stream@1.0.27-1
│ │ │ ├── core-util-is@1.0.1
│ │ │ ├── inherits@2.0.1
│ │ │ ├── isarray@0.0.1
│ │ │ └── string_decoder@0.10.31
│ │ └── reduce-component@1.0.1
│ ├─┬ x-ray-select@1.1.0
│ │ ├─┬ cheerio@0.18.0
│ │ │ ├─┬ CSSselect@0.4.1
│ │ │ │ ├── CSSwhat@0.4.7
│ │ │ │ └─┬ domutils@1.4.3
│ │ │ │   └── domelementtype@1.3.0
│ │ │ ├─┬ dom-serializer@0.0.1
│ │ │ │ └── domelementtype@1.1.3
│ │ │ ├── entities@1.1.1
│ │ │ ├─┬ htmlparser2@3.8.2
│ │ │ │ ├── domelementtype@1.3.0
│ │ │ │ ├── domhandler@2.3.0
│ │ │ │ ├── domutils@1.5.1
│ │ │ │ ├── entities@1.0.0
│ │ │ │ └─┬ readable-stream@1.1.13
│ │ │ │   ├── core-util-is@1.0.1
│ │ │ │   ├── inherits@2.0.1
│ │ │ │   ├── isarray@0.0.1
│ │ │ │   └── string_decoder@0.10.31
│ │ │ └── lodash@2.4.2
│ │ ├── component-type@1.1.0
│ │ ├── format-parser@0.0.2
│ │ ├─┬ lodash.omit@3.1.0
│ │ │ ├── lodash._arraymap@3.0.0
│ │ │ ├─┬ lodash._basedifference@3.0.2
│ │ │ │ ├── lodash._baseindexof@3.1.0
│ │ │ │ ├── lodash._cacheindexof@3.0.2
│ │ │ │ └─┬ lodash._createcache@3.1.1
│ │ │ │   └── lodash._getnative@3.9.0
│ │ │ ├─┬ lodash._baseflatten@3.1.3
│ │ │ │ ├── lodash.isarguments@3.0.3
│ │ │ │ └── lodash.isarray@3.0.3
│ │ │ ├── lodash._bindcallback@3.0.1
│ │ │ ├── lodash._pickbyarray@3.0.2
│ │ │ ├─┬ lodash._pickbycallback@3.0.0
│ │ │ │ └── lodash._basefor@3.0.2
│ │ │ ├─┬ lodash.keysin@3.0.7
│ │ │ │ ├── lodash.isarguments@3.0.3
│ │ │ │ └── lodash.isarray@3.0.3
│ │ │ └── lodash.restparam@3.6.1
│ │ └─┬ lodash.zip@3.1.0
│ │   ├── lodash.restparam@3.6.1
│ │   └─┬ lodash.unzip@3.2.1
│ │     ├── lodash._arrayfilter@3.0.0
│ │     └── lodash._arraymap@3.0.0
│ └─┬ yieldly@0.0.1
│   └── is-browser@2.0.1
└─┬ x-ray-phantom@1.0.0
  ├─┬ debug@2.2.0
  │ └── ms@0.7.1
  ├─┬ nightmare@1.8.1
  │ ├── clone@0.1.19
  │ ├── debug@0.7.4
  │ ├── defaults@1.0.2
  │ ├── jsesc@0.5.0
  │ ├── once@1.3.0
  │ └─┬ phantom@0.7.2
  │   ├─┬ dnode@1.2.1
  │   │ ├── dnode-protocol@0.2.2
  │   │ ├── jsonify@0.0.0
  │   │ └─┬ weak@0.4.1
  │   │   ├── bindings@1.2.1
  │   │   └── nan@1.8.4
  │   ├─┬ shoe@0.0.15
  │   │ ├─┬ sockjs@0.3.7
  │   │ │ ├── faye-websocket@0.4.4
  │   │ │ └── node-uuid@1.3.3
  │   │ └── sockjs-client@0.0.0-unreleasable
  │   ├── traverse@0.6.6
  │   └── win-spawn@2.0.0
  ├── normalizeurl@0.1.3
  └─┬ wrap-fn@0.1.4
    └── co@3.1.0
harlantwood commented 9 years ago

Hm, when I got deeper into it, I though that maybe the change in your readme should be from:

var Xray = require('x-ray');

to:

var Xray = require('x-ray-crawler');

That seems closer to what is going on in your tests.