【发布时间】:2012-02-20 01:02:13
【问题描述】:
正如标题中所说:
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('title') 返回整个页面的 html。这发生在我尝试选择的任何元素上。有什么建议吗?
【问题讨论】:
-
你试过打开另一个网址吗?如果是这样,你会得到整个页面吗?