Created
September 2, 2013 20:12
-
-
Save christian-bromann/6416851 to your computer and use it in GitHub Desktop.
run WebdriverJS with Buster.JS
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 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