-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathnightwatch.conf.js
More file actions
138 lines (121 loc) · 4.64 KB
/
nightwatch.conf.js
File metadata and controls
138 lines (121 loc) · 4.64 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
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
// Refer to the online docs for more details:
// https://nightwatchjs.org/gettingstarted/configuration/
//
// _ _ _ _ _ _ _
// | \ | |(_) | | | | | | | |
// | \| | _ __ _ | |__ | |_ __ __ __ _ | |_ ___ | |__
// | . ` || | / _` || '_ \ | __|\ \ /\ / / / _` || __| / __|| '_ \
// | |\ || || (_| || | | || |_ \ V V / | (_| || |_ | (__ | | | |
// \_| \_/|_| \__, ||_| |_| \__| \_/\_/ \__,_| \__| \___||_| |_|
// __/ |
// |___/
module.exports = {
// An array of folders (excluding subfolders) where your tests are located;
// if this is not specified, the test source must be passed as the second argument to the test runner.
src_folders: ["test", "nightwatch"],
// See https://nightwatchjs.org/guide/concepts/page-object-model.html
page_objects_path: [],
// See https://nightwatchjs.org/guide/extending-nightwatch/adding-custom-commands.html
custom_commands_path: [],
// See https://nightwatchjs.org/guide/extending-nightwatch/adding-custom-assertions.html
custom_assertions_path: [],
// See https://nightwatchjs.org/guide/extending-nightwatch/adding-plugins.html
plugins: [],
// See https://nightwatchjs.org/guide/concepts/test-globals.html
globals_path: "",
webdriver: {},
test_workers: {
enabled: true,
},
test_settings: {
default: {
disable_error_log: false,
launch_url: "",
screenshots: {
enabled: false,
path: "screens",
on_failure: true,
},
desiredCapabilities: {
browserName: "",
},
webdriver: {
start_process: true,
server_path: "",
},
},
app: {
selenium: {
start_process: true,
use_appium: true,
host: "localhost",
port: 4723,
server_path: "",
// args to pass when starting the Appium server
cli_args: [
// automatically download the required chromedriver
// '--allow-insecure=chromedriver_autodownload'
],
// Remove below line if using Appium v1
default_path_prefix: "",
},
webdriver: {
timeout_options: {
timeout: 150000,
retry_attempts: 3,
},
keep_alive: false,
start_process: false,
},
},
"app.ios.simulator": {
extends: "app",
desiredCapabilities: {
// More capabilities can be found at https://github.com/appium/appium-xcuitest-driver#capabilities
browserName: null,
platformName: "ios",
// `appium:options` is not natively supported in Appium v1, but works with Nightwatch.
// If copying these capabilities elsewhere while using Appium v1, make sure to remove `appium:options`
// and add `appium:` prefix to each one of its capabilities, e.g. change 'app' to 'appium:app'.
"appium:options": {
automationName: "XCUITest",
platformVersion: "16.4",
deviceName: "iPhone 13",
// While Appium v1 supports relative paths, it's more safe to use absolute paths instead.
// Appium v2 does not support relative paths.
app: `${__dirname}/nightwatch/sample-apps/wikipedia.zip`,
bundleId: "org.wikimedia.wikipedia",
newCommandTimeout: 0,
},
},
},
"app.ios.real": {
extends: "app",
desiredCapabilities: {
// More capabilities can be found at https://github.com/appium/appium-xcuitest-driver#capabilities
browserName: null,
platformName: "ios",
deviceName: "Saima's iPhone 13",
// `appium:options` is not natively supported in Appium v1, but works with Nightwatch.
// If copying these capabilities elsewhere while using Appium v1, make sure to remove `appium:options`
// and add `appium:` prefix to each one of its capabilities, e.g. change 'app' to 'appium:app'.
"appium:options": {
automationName: "XCUITest",
// While Appium v1 supports relative paths, it's more safe to use absolute paths instead.
// Appium v2 does not support relative paths.
app: `${__dirname}/nightwatch/sample-apps/wikipedia.zip`,
bundleId: "org.wikimedia.wikipedia",
newCommandTimeout: 0,
// add udid of the device to run tests on. Or, pass the id to `--deviceId` flag when running tests.
// device id could be retrieved from Xcode > Window > "Devices and Simulators" window.
udid: "00008110-01165983E05801E",
},
},
},
},
usage_analytics: {
enabled: true,
log_path: "./logs/analytics",
client_id: "029b4ad0-da1e-4cde-bd0d-c1477552d7e6",
},
};