-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathnightwatch.conf.js
54 lines (47 loc) · 1.27 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
const dotenv = require("dotenv")
dotenv.config()
const baseFolder = "tests/e2e"
const outputFolder = `${baseFolder}/output`
if (process.env.CHROMEWEBDRIVER) {
chromedriver_path = process.env.CHROMEWEBDRIVER;
} else {
chromedriver_path = require("chromedriver").path;
}
console.log("Using chromedriver from", chromedriver_path)
module.exports = {
src_folders: `${baseFolder}/specs`,
page_objects_path: `${baseFolder}/pages`,
output_folder: outputFolder,
screenshots: {
enabled: true,
path: outputFolder,
},
// Common configuration options for the webdriver
webdriver: {
log_path: outputFolder,
start_process: true,
},
test_settings: {
default: {
launch_url: process.env.APP_URL // read from the .env file
},
chrome: {
desiredCapabilities: {
browserName: "chrome",
},
webdriver: {
port: 9515,
server_path: chromedriver_path,
},
},
firefox: {
desiredCapabilities: {
browserName: "firefox"
},
webdriver: {
port: 4444,
server_path: require("geckodriver").path,
}
},
}
}