-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathprotractor.config.js
36 lines (35 loc) · 1.12 KB
/
protractor.config.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
const SELENIUM_FOLDER = './node_modules/protractor/node_modules/webdriver-manager/selenium';
const fs = require('fs');
let res, seleniumVersion;
fs.readdirSync(SELENIUM_FOLDER).forEach(file => {
res = file.match(/selenium-server-standalone-(\d{1}.\d{1}.\d{1}).jar/i);
if (res) {
seleniumVersion = res[1];
}
})
if (!seleniumVersion) {
throw new Error('No selenium server jar found inside your protractor node_modules subfolder');
}
exports.config = {
directConnect: false,
allScriptsTimeout: 11000,
getPageTimeout: 10000,
framework: 'jasmine2',
jasmineNodeOpts: {
defaultTimeoutInterval: 30000
},
capabilities: {
'browserName': 'chrome'
},
baseUrl: 'http://localhost:9000',
seleniumServerJar: `./node_modules/protractor/node_modules/webdriver-manager/selenium/selenium-server-standalone-${seleniumVersion}.jar`,
specs: [
'./test/base-protractor.spec.js',
'./test/element-finder.spec.js',
'./test/element-array-finder.spec.js'
],
onPrepare: function() {
require('./index');
browser.waitForAngularEnabled(true);
}
};