-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathnightwatch.conf.js
74 lines (70 loc) · 2.09 KB
/
nightwatch.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
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
const chromedriver = require('chromedriver');
const glob = require('glob')
const fs = require('fs')
//const geckodriver = require('geckodriver');
//globbing to make it easier to add dynamic page structure
const base_page_glob = "pages/**/*"
const page_obj_array = Array()
glob.sync(base_page_glob).forEach(function(file, index){
if(fs.lstatSync(file).isDirectory()){
page_obj_array.push(file)
}
})
console.log("DEBUG glob: " + page_obj_array)
module.exports = {
silent: !process.env.NIGHTWATCH_VERBOSE,
// page_objects_path: ["./pages/basic","./pages/special"],
page_objects_path: page_obj_array,
test_settings: {
default: {
webdriver: {
start_process: true,
port: 4444
},
screenshots: {
enabled: true,
path: 'screenshots'
}
},
chromeHeadless: {
webdriver: {
server_path: chromedriver.path,
cli_args: ['--port=4444']
},
desiredCapabilities: {
browserName: 'chrome',
javascriptEnabled: true,
acceptSslCerts: true,
chromeOptions: {
args: ['headless', 'disable-gpu']
}
}
},
chrome: {
webdriver: {
server_path: chromedriver.path,
cli_args: ['--port=4444']
},
desiredCapabilities: {
browserName: 'chrome',
javascriptEnabled: true,
acceptSslCerts: true,
chromeOptions: {
args: ['disable-gpu']
}
}
},
/* firefox: {
webdriver: {
server_path: geckodriver.path,
cli_args: ['--port', '4444', '--log', 'debug']
},
desiredCapabilities: {
browserName: 'firefox',
javascriptEnabled: true,
acceptSslCerts: true,
marionette: true
}
} */
}
};