forked from webdriverio/webdriverio
-
Notifications
You must be signed in to change notification settings - Fork 0
/
webdriverio.with.jasmine.spec.js
35 lines (30 loc) · 1.08 KB
/
webdriverio.with.jasmine.spec.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 webdriverio = require('../index');
describe('my webdriverio tests', function() {
var client = {};
jasmine.DEFAULT_TIMEOUT_INTERVAL = 9999999;
beforeEach(function() {
client = webdriverio.remote({ desiredCapabilities: {browserName: 'phantomjs'} });
client.init();
});
it('test it', function(done) {
client
.url('https://github.com/')
.getElementSize('.header-logo-wordmark', function(err, result) {
expect(err).toBeFalsy();
expect(result.height).toBe(26);
expect(result.width).toBe(37);
})
.getTitle(function(err, title) {
expect(err).toBeFalsy();
expect(title).toBe('GitHub · Build software better, together.');
})
.getCssProperty('a[href="/plans"]', 'color', function(err, color){
expect(err).toBeFalsy();
expect(color).toBe('rgba(65,131,196,1)');
})
.call(done);
});
afterEach(function(done) {
client.end(done);
});
});