Skip to content

Instantly share code, notes, and snippets.

@JacksonTian
Created September 18, 2012 06:13
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save JacksonTian/3741528 to your computer and use it in GitHub Desktop.
Save JacksonTian/3741528 to your computer and use it in GitHub Desktop.
自动化测试
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