@@ -44,43 +44,52 @@ def options(self, parser, env):
4444 super (SeleniumBrowser , self ).options (parser , env = env )
4545
4646 parser .add_option (
47- '--browser' , action = 'store' ,
47+ '--browser' ,
48+ action = 'store' ,
4849 dest = 'browser' ,
4950 choices = constants .ValidBrowsers .valid_browsers ,
5051 default = constants .Browser .GOOGLE_CHROME ,
5152 help = """Specifies the web browser to use. Default: Chrome.
5253 If you want to use Firefox, explicitly indicate that.
5354 Example: (--browser=firefox)""" )
5455 parser .add_option (
55- '--browser_version' , action = 'store' ,
56+ '--browser_version' , '--browser-version' ,
57+ action = 'store' ,
5658 dest = 'browser_version' ,
5759 default = "latest" ,
5860 help = """The browser version to use. Explicitly select
5961 a version number or use "latest".""" )
6062 parser .add_option (
61- '--cap_file' , action = 'store' ,
63+ '--cap_file' , '--cap-file' ,
64+ action = 'store' ,
6265 dest = 'cap_file' ,
6366 default = None ,
6467 help = """The file that stores browser desired capabilities
6568 for BrowserStack or Sauce Labs web drivers.""" )
6669 parser .add_option (
67- '--user_data_dir' , action = 'store' ,
70+ '--user_data_dir' , '--user-data-dir' ,
71+ action = 'store' ,
6872 dest = 'user_data_dir' ,
6973 default = None ,
7074 help = """The Chrome User Data Directory to use. (Chrome Profile)
7175 If the directory doesn't exist, it'll be created.""" )
7276 parser .add_option (
73- '--server' , action = 'store' , dest = 'servername' ,
77+ '--server' ,
78+ action = 'store' ,
79+ dest = 'servername' ,
7480 default = 'localhost' ,
7581 help = """Designates the Selenium Grid server to use.
7682 Default: localhost.""" )
7783 parser .add_option (
78- '--port' , action = 'store' , dest = 'port' ,
84+ '--port' ,
85+ action = 'store' ,
86+ dest = 'port' ,
7987 default = '4444' ,
8088 help = """Designates the Selenium Grid port to use.
8189 Default: 4444.""" )
8290 parser .add_option (
83- '--proxy' , action = 'store' ,
91+ '--proxy' ,
92+ action = 'store' ,
8493 dest = 'proxy_string' ,
8594 default = None ,
8695 help = """Designates the proxy server:port to use.
@@ -89,75 +98,91 @@ def options(self, parser, env):
8998 A dict key from proxy_list.PROXY_LIST
9099 Default: None.""" )
91100 parser .add_option (
92- '--agent' , action = 'store' ,
101+ '--agent' ,
102+ action = 'store' ,
93103 dest = 'user_agent' ,
94104 default = None ,
95105 help = """Designates the User-Agent for the browser to use.
96106 Format: A string.
97107 Default: None.""" )
98108 parser .add_option (
99- '--extension_zip' , action = 'store' ,
109+ '--extension_zip' , '--extension-zip' ,
110+ action = 'store' ,
100111 dest = 'extension_zip' ,
101112 default = None ,
102113 help = """Designates the Chrome Extension ZIP file to load.
103114 Format: A comma-separated list of .zip or .crx files
104115 containing the Chrome extensions to load.
105116 Default: None.""" )
106117 parser .add_option (
107- '--extension_dir' , action = 'store' ,
118+ '--extension_dir' , '--extension-dir' ,
119+ action = 'store' ,
108120 dest = 'extension_dir' ,
109121 default = None ,
110122 help = """Designates the Chrome Extension folder to load.
111123 Format: A directory containing the Chrome extension.
112124 (Can also be a comma-separated list of directories.)
113125 Default: None.""" )
114126 parser .add_option (
115- '--headless' , action = "store_true" ,
127+ '--headless' ,
128+ action = "store_true" ,
116129 dest = 'headless' ,
117130 default = False ,
118131 help = """Using this makes Webdriver run headlessly,
119132 which is required on headless machines.""" )
120133 parser .add_option (
121- '--demo_mode' , action = "store_true" ,
134+ '--demo_mode' , '--demo-mode' ,
135+ action = "store_true" ,
122136 dest = 'demo_mode' ,
123137 default = False ,
124138 help = """Using this slows down the automation so that
125139 you can see what it's actually doing.""" )
126140 parser .add_option (
127- '--demo_sleep' , action = 'store' , dest = 'demo_sleep' ,
141+ '--demo_sleep' , '--demo-sleep' ,
142+ action = 'store' ,
143+ dest = 'demo_sleep' ,
128144 default = None ,
129145 help = """Setting this overrides the Demo Mode sleep
130146 time that happens after browser actions.""" )
131147 parser .add_option (
132- '--highlights' , action = 'store' ,
133- dest = 'highlights' , default = None ,
148+ '--highlights' ,
149+ action = 'store' ,
150+ dest = 'highlights' ,
151+ default = None ,
134152 help = """Setting this overrides the default number of
135153 highlight animation loops to have per call.""" )
136154 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 ,
139159 help = """Setting this overrides the default time that
140160 messenger notifications remain visible when reaching
141161 assert statements during Demo Mode.""" )
142162 parser .add_option (
143- '--check_js' , action = "store_true" ,
163+ '--check_js' , '--check-js' ,
164+ action = "store_true" ,
144165 dest = 'js_checking_on' ,
145166 default = False ,
146167 help = """The option to check for JavaScript errors after
147168 every page load.""" )
148169 parser .add_option (
149- '--ad_block' , action = "store_true" ,
170+ '--ad_block' , '--ad-block' ,
171+ action = "store_true" ,
150172 dest = 'ad_block_on' ,
151173 default = False ,
152174 help = """Using this makes WebDriver block display ads
153175 that are defined in ad_block_list.AD_BLOCK_LIST.""" )
154176 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 ,
157181 help = """Setting this overrides the default wait time
158182 before each MasterQA verification pop-up.""" )
159183 parser .add_option (
160- '--disable_csp' , action = "store_true" ,
184+ '--disable_csp' , '--disable-csp' ,
185+ action = "store_true" ,
161186 dest = 'disable_csp' ,
162187 default = False ,
163188 help = """Using this disables the Content Security Policy of
@@ -167,26 +192,30 @@ def options(self, parser, env):
167192 Setting this to True (--disable_csp) overrides the
168193 value set in seleniumbase/config/settings.py""" )
169194 parser .add_option (
170- '--enable_sync' , action = "store_true" ,
195+ '--enable_sync' , '--enable-sync' ,
196+ action = "store_true" ,
171197 dest = 'enable_sync' ,
172198 default = False ,
173199 help = """Using this enables the "Chrome Sync" feature.""" )
174200 parser .add_option (
175- '--save_screenshot' , action = "store_true" ,
201+ '--save_screenshot' , '--save-screenshot' ,
202+ action = "store_true" ,
176203 dest = 'save_screenshot' ,
177204 default = False ,
178205 help = """Take a screenshot on last page after the last step
179206 of the test. (Added to the "latest_logs" folder.)""" )
180207 parser .add_option (
181- '--visual_baseline' , action = 'store_true' ,
208+ '--visual_baseline' , '--visual-baseline' ,
209+ action = 'store_true' ,
182210 dest = 'visual_baseline' ,
183211 default = False ,
184212 help = """Setting this resets the visual baseline for
185213 Automated Visual Testing with SeleniumBase.
186214 When a test calls self.check_window(), it will
187215 rebuild its files in the visual_baseline folder.""" )
188216 parser .add_option (
189- '--timeout_multiplier' , action = 'store' ,
217+ '--timeout_multiplier' , '--timeout-multiplier' ,
218+ action = 'store' ,
190219 dest = 'timeout_multiplier' ,
191220 default = None ,
192221 help = """Setting this overrides the default timeout
0 commit comments