0
就像它的标题说:Zombiejs browser.text方法返回整个文档
zombie = require "zombie"
should = require "should"
browser = new zombie.Browser();
describe "index", ->
describe "herp derp", ->
it "should display room input", (done) ->
browser.visit "http://localhost:3000/", (err, browser) ->
if err
throw err.message
browser.text('title').should.equal 'Welcome to Test!'
done()
browser.text( '标题')返回整个页面的HTML。这发生在我尝试选择的任何元素上。有什么建议么?
你试过打开另一个URL吗?如果是这样,你会看到整个页面吗? – 2012-02-19 16:53:57