Can't get Google example to work #60

Open
killercowuk opened this Issue Aug 3, 2011 · 2 comments

Comments

Projects
None yet
3 participants
@killercowuk

/**

  • Module dependencies.
    */

var tobi = require('tobi')
, should = require('should')
, browser = tobi.createBrowser(80, 'www.google.com');

browser.get('/', function(res){
res.should.have.status(200);

browser.click("input[name=btnG]", function(res, $){
$('title').should.have.text('Google');
});

});

results in

/home/main/projects/node_modules/tobi/lib/browser.js:421
var elems = this.context.find(selector).filter(function(){
^
TypeError: Object function (selector, fn){
var prev = this.context;
this.context = this.context.find(selector);
fn();
this.context = prev;
return this;
} has no method 'find'
at Browser.locate (/home/main/projects/node_modules/tobi/lib/browser.js:421:28)
at Browser.click (/home/main/projects/node_modules/tobi/lib/browser.js:454:27)
at /home/main/projects/tobitest.js:13:11
at IncomingMessage. (/home/main/projects/node_modules/tobi/lib/browser.js:281:9)
at IncomingMessage.emit (events.js:81:20)
at HTTPParser.onMessageComplete (http.js:133:23)
at Socket.onend (http.js:1266:12)
at Socket._onReadable (net.js:659:26)
at IOWatcher.onReadable as callback

I tried installing all dependancies and still no luck.. Any suggestions? (node version: v.0.4.10)

@Almad

This comment has been minimized.

Show comment Hide comment
@Almad

Almad Feb 8, 2012

Same here.

Almad commented Feb 8, 2012

Same here.

@richzw

This comment has been minimized.

Show comment Hide comment
@richzw

richzw Jul 22, 2012

+1

richzw commented Jul 22, 2012

+1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment