Created
September 18, 2012 06:13
-
-
Save JacksonTian/3741528 to your computer and use it in GitHub Desktop.
自动化测试
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
var Ghost = require('webghost'); | |
var should = require('should'); | |
var ghost = new Ghost({browser: "chrome", host: "ip"}); | |
ghost.open() | |
.go("http://your/url") | |
.text('p', function (text) { | |
text.should.be.not.equal('haha'); | |
}) | |
.click('button') // 点击按钮 | |
.text('p', function (text) { | |
text.should.be.equal('haha'); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment