@@ -44,43 +44,52 @@ def options(self, parser, env):
44
44
super (SeleniumBrowser , self ).options (parser , env = env )
45
45
46
46
parser .add_option (
47
- '--browser' , action = 'store' ,
47
+ '--browser' ,
48
+ action = 'store' ,
48
49
dest = 'browser' ,
49
50
choices = constants .ValidBrowsers .valid_browsers ,
50
51
default = constants .Browser .GOOGLE_CHROME ,
51
52
help = """Specifies the web browser to use. Default: Chrome.
52
53
If you want to use Firefox, explicitly indicate that.
53
54
Example: (--browser=firefox)""" )
54
55
parser .add_option (
55
- '--browser_version' , action = 'store' ,
56
+ '--browser_version' , '--browser-version' ,
57
+ action = 'store' ,
56
58
dest = 'browser_version' ,
57
59
default = "latest" ,
58
60
help = """The browser version to use. Explicitly select
59
61
a version number or use "latest".""" )
60
62
parser .add_option (
61
- '--cap_file' , action = 'store' ,
63
+ '--cap_file' , '--cap-file' ,
64
+ action = 'store' ,
62
65
dest = 'cap_file' ,
63
66
default = None ,
64
67
help = """The file that stores browser desired capabilities
65
68
for BrowserStack or Sauce Labs web drivers.""" )
66
69
parser .add_option (
67
- '--user_data_dir' , action = 'store' ,
70
+ '--user_data_dir' , '--user-data-dir' ,
71
+ action = 'store' ,
68
72
dest = 'user_data_dir' ,
69
73
default = None ,
70
74
help = """The Chrome User Data Directory to use. (Chrome Profile)
71
75
If the directory doesn't exist, it'll be created.""" )
72
76
parser .add_option (
73
- '--server' , action = 'store' , dest = 'servername' ,
77
+ '--server' ,
78
+ action = 'store' ,
79
+ dest = 'servername' ,
74
80
default = 'localhost' ,
75
81
help = """Designates the Selenium Grid server to use.
76
82
Default: localhost.""" )
77
83
parser .add_option (
78
- '--port' , action = 'store' , dest = 'port' ,
84
+ '--port' ,
85
+ action = 'store' ,
86
+ dest = 'port' ,
79
87
default = '4444' ,
80
88
help = """Designates the Selenium Grid port to use.
81
89
Default: 4444.""" )
82
90
parser .add_option (
83
- '--proxy' , action = 'store' ,
91
+ '--proxy' ,
92
+ action = 'store' ,
84
93
dest = 'proxy_string' ,
85
94
default = None ,
86
95
help = """Designates the proxy server:port to use.
@@ -89,75 +98,91 @@ def options(self, parser, env):
89
98
A dict key from proxy_list.PROXY_LIST
90
99
Default: None.""" )
91
100
parser .add_option (
92
- '--agent' , action = 'store' ,
101
+ '--agent' ,
102
+ action = 'store' ,
93
103
dest = 'user_agent' ,
94
104
default = None ,
95
105
help = """Designates the User-Agent for the browser to use.
96
106
Format: A string.
97
107
Default: None.""" )
98
108
parser .add_option (
99
- '--extension_zip' , action = 'store' ,
109
+ '--extension_zip' , '--extension-zip' ,
110
+ action = 'store' ,
100
111
dest = 'extension_zip' ,
101
112
default = None ,
102
113
help = """Designates the Chrome Extension ZIP file to load.
103
114
Format: A comma-separated list of .zip or .crx files
104
115
containing the Chrome extensions to load.
105
116
Default: None.""" )
106
117
parser .add_option (
107
- '--extension_dir' , action = 'store' ,
118
+ '--extension_dir' , '--extension-dir' ,
119
+ action = 'store' ,
108
120
dest = 'extension_dir' ,
109
121
default = None ,
110
122
help = """Designates the Chrome Extension folder to load.
111
123
Format: A directory containing the Chrome extension.
112
124
(Can also be a comma-separated list of directories.)
113
125
Default: None.""" )
114
126
parser .add_option (
115
- '--headless' , action = "store_true" ,
127
+ '--headless' ,
128
+ action = "store_true" ,
116
129
dest = 'headless' ,
117
130
default = False ,
118
131
help = """Using this makes Webdriver run headlessly,
119
132
which is required on headless machines.""" )
120
133
parser .add_option (
121
- '--demo_mode' , action = "store_true" ,
134
+ '--demo_mode' , '--demo-mode' ,
135
+ action = "store_true" ,
122
136
dest = 'demo_mode' ,
123
137
default = False ,
124
138
help = """Using this slows down the automation so that
125
139
you can see what it's actually doing.""" )
126
140
parser .add_option (
127
- '--demo_sleep' , action = 'store' , dest = 'demo_sleep' ,
141
+ '--demo_sleep' , '--demo-sleep' ,
142
+ action = 'store' ,
143
+ dest = 'demo_sleep' ,
128
144
default = None ,
129
145
help = """Setting this overrides the Demo Mode sleep
130
146
time that happens after browser actions.""" )
131
147
parser .add_option (
132
- '--highlights' , action = 'store' ,
133
- dest = 'highlights' , default = None ,
148
+ '--highlights' ,
149
+ action = 'store' ,
150
+ dest = 'highlights' ,
151
+ default = None ,
134
152
help = """Setting this overrides the default number of
135
153
highlight animation loops to have per call.""" )
136
154
parser .add_option (
137
- '--message_duration' , action = "store" ,
138
- dest = 'message_duration' , default = None ,
155
+ '--message_duration' , '--message-duration' ,
156
+ action = "store" ,
157
+ dest = 'message_duration' ,
158
+ default = None ,
139
159
help = """Setting this overrides the default time that
140
160
messenger notifications remain visible when reaching
141
161
assert statements during Demo Mode.""" )
142
162
parser .add_option (
143
- '--check_js' , action = "store_true" ,
163
+ '--check_js' , '--check-js' ,
164
+ action = "store_true" ,
144
165
dest = 'js_checking_on' ,
145
166
default = False ,
146
167
help = """The option to check for JavaScript errors after
147
168
every page load.""" )
148
169
parser .add_option (
149
- '--ad_block' , action = "store_true" ,
170
+ '--ad_block' , '--ad-block' ,
171
+ action = "store_true" ,
150
172
dest = 'ad_block_on' ,
151
173
default = False ,
152
174
help = """Using this makes WebDriver block display ads
153
175
that are defined in ad_block_list.AD_BLOCK_LIST.""" )
154
176
parser .add_option (
155
- '--verify_delay' , action = 'store' ,
156
- dest = 'verify_delay' , default = None ,
177
+ '--verify_delay' , '--verify-delay' ,
178
+ action = 'store' ,
179
+ dest = 'verify_delay' ,
180
+ default = None ,
157
181
help = """Setting this overrides the default wait time
158
182
before each MasterQA verification pop-up.""" )
159
183
parser .add_option (
160
- '--disable_csp' , action = "store_true" ,
184
+ '--disable_csp' , '--disable-csp' ,
185
+ action = "store_true" ,
161
186
dest = 'disable_csp' ,
162
187
default = False ,
163
188
help = """Using this disables the Content Security Policy of
@@ -167,26 +192,30 @@ def options(self, parser, env):
167
192
Setting this to True (--disable_csp) overrides the
168
193
value set in seleniumbase/config/settings.py""" )
169
194
parser .add_option (
170
- '--enable_sync' , action = "store_true" ,
195
+ '--enable_sync' , '--enable-sync' ,
196
+ action = "store_true" ,
171
197
dest = 'enable_sync' ,
172
198
default = False ,
173
199
help = """Using this enables the "Chrome Sync" feature.""" )
174
200
parser .add_option (
175
- '--save_screenshot' , action = "store_true" ,
201
+ '--save_screenshot' , '--save-screenshot' ,
202
+ action = "store_true" ,
176
203
dest = 'save_screenshot' ,
177
204
default = False ,
178
205
help = """Take a screenshot on last page after the last step
179
206
of the test. (Added to the "latest_logs" folder.)""" )
180
207
parser .add_option (
181
- '--visual_baseline' , action = 'store_true' ,
208
+ '--visual_baseline' , '--visual-baseline' ,
209
+ action = 'store_true' ,
182
210
dest = 'visual_baseline' ,
183
211
default = False ,
184
212
help = """Setting this resets the visual baseline for
185
213
Automated Visual Testing with SeleniumBase.
186
214
When a test calls self.check_window(), it will
187
215
rebuild its files in the visual_baseline folder.""" )
188
216
parser .add_option (
189
- '--timeout_multiplier' , action = 'store' ,
217
+ '--timeout_multiplier' , '--timeout-multiplier' ,
218
+ action = 'store' ,
190
219
dest = 'timeout_multiplier' ,
191
220
default = None ,
192
221
help = """Setting this overrides the default timeout
0 commit comments