-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathprotractor.conf.js
38 lines (36 loc) · 1.1 KB
/
protractor.conf.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
36
37
38
var baseFile = __dirname + '/index.html';
var nwBinary;
switch (process.platform) {
case 'darwin':
nwBinary = process.env.PWD + '/node_modules/nw/nwjs/nwjs.app/Contents/MacOS/nwjs';
break;
case 'linux':
nwBinary = process.env.PWD + '/node_modules/nw/bin/nw';
break;
case 'win32':
nwBinary = nwBinary = process.env.PWD + '/node_modules/nw/nwjs/nw.exe';
break;
}
exports.config = {
directConnect: true,
chromeDriver: '/usr/local/bin/chromedriver', //this needs to be updated per OS, download binary from dl.nwjs.io
capabilities: {
browserName: 'chrome',
chromeOptions: {
// Path to NW.js binary goes here!
binary: nwBinary
}
},
// Spec patterns are relative to the location of this config.
onPrepare: function () {
browser.ignoreSynchronization = true;
browser.resetUrl = 'file://' + baseFile;
browser.driver.get('file://' + baseFile);
},
onComplete: function () {
},
baseUrl: __dirname + '/index.html',
specs: [
'./tests/e2e/*.spec.js'
]
};