-
Notifications
You must be signed in to change notification settings - Fork 9
Expand file tree
/
Copy pathHomePage.js
More file actions
57 lines (44 loc) · 1.38 KB
/
HomePage.js
File metadata and controls
57 lines (44 loc) · 1.38 KB
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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
/**
* Created by Dmitry on 28/11/2015.
*/
var Page = require('astrolabe').Page;
module.exports = Page.create({
url: {value: 'http://localhost:9000'},
navigationBar: {
get: function () {
return this.findElement(this.by.css('.navbar'));
}
},// finds an element with the class 'navbar',
navigationLinks : {
get : function(){
return this.findElements(this.by.css(' .navbar a'));
}
},
header: {
get: function () {
return this.findElement(this.by.css('.page-header'));
}
},// finds an element with the class 'page-header'
footer: {
get: function () {
return this.findElement(this.by.tagName('footer'));
}
},// finds an element with the class 'page-header'
mainContainer: {
get: function () {
return this.findElement(this.by.id('container'));
}
},// finds an element with the class 'homePageContainer'
moreLinksContainer: {
get: function () {
return this.findElement(this.by.id('moreLinksContainer'));
}
},// finds an element with the class 'homePageContainer'
openMenu: {
value: function () {
var morePagesLink = this.navigationBar.findElement(this.by.id('morePagesLink')).then(function (link) {
link.click();
});
}
}
});