Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@zoghal
Forked from JacksonTian/test.js
Last active August 29, 2015 14:21
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save zoghal/0d58e59e92ea5ca18bc0 to your computer and use it in GitHub Desktop.
Save zoghal/0d58e59e92ea5ca18bc0 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