forked from webdriverio/webdriverio
-
Notifications
You must be signed in to change notification settings - Fork 0
/
webdriverio.with.buster.js
35 lines (31 loc) · 1.13 KB
/
webdriverio.with.buster.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
var buster = require("buster"),
assert = buster.referee.assert,
webdriverio = require('../index');
buster.testCase("Nested setup and teardown call order", {
'setUp': function (done) {
this.timeout = 5000;
client = webdriverio.remote({ desiredCapabilities: {browserName: 'firefox'} });
client.init(done);
},
'test it': function (done) {
client
.url('http://github.com/')
.getElementSize('.header-logo-wordmark', function(err, result) {
assert(err === undefined);
assert(result.height === 26);
assert(result.width === 89);
})
.getTitle(function(err, title) {
assert(err === undefined);
assert(title === 'GitHub · Build software better, together.');
})
.getCssProperty('a[href="/plans"]', 'color', function(err, result){
assert(err === undefined);
assert(result.value === 'rgba(65,131,196,1)');
})
.call(done);
},
'tearDown': function(done) {
client.end(done);
}
});