Skip to content

Instantly share code, notes, and snippets.

@christian-bromann
Created September 2, 2013 20:12
Show Gist options
  • Save christian-bromann/6416851 to your computer and use it in GitHub Desktop.
Save christian-bromann/6416851 to your computer and use it in GitHub Desktop.
run WebdriverJS with Buster.JS
var buster = require("buster"),
webdriverjs = require('webdriverjs');
buster.testCase("my webdriverjs tests", {
'setUp': function() {
this.timeout = 9999999;
client = webdriverjs.remote({ desiredCapabilities: {browserName: 'phantomjs'} });
client.init();
},
'test it': function (done) {
client
.url('https://github.com/')
.getElementSize('.header-logo-wordmark', function(err, result) {
assert(err === null);
assert(result.height === 32);
assert(result.width === 89);
})
.getTitle(function(err, title) {
assert(err === null);
assert(title === 'GitHub · Build software better, together.');
})
.getElementCssProperty('css selector','a[href="/plans"]', 'color', function(err, result){
assert(err === null);
assert(result === 'rgba(65,131,196,1)');
})
.call(done);
},
'tearDown': function(done) {
client.end(done);
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment