1
1
<h2 >🔮 Console Scripts 🔮</h2 >
2
2
3
- ⭐ SeleniumBase console scripts help you get things done, such as installing web drivers, creating a test directory with useful files, activating the SeleniumBase Recorder, launching the SeleniumBase Commander, translating tests into other languages, running a Selenium Grid, and more.
3
+ ⭐ SeleniumBase console scripts help you get things done, such as getting web drivers, creating a test directory with useful files, activating the SeleniumBase Recorder, launching the SeleniumBase Commander, translating tests into other languages, running a Selenium Grid, and more.
4
4
5
5
* Usage: `` seleniumbase [COMMAND] [PARAMETERS] ``
6
6
12
12
13
13
```
14
14
COMMANDS:
15
- install [DRIVER] [OPTIONS]
15
+ get / install [DRIVER] [OPTIONS]
16
16
methods (List common Python methods)
17
17
options (List common pytest options)
18
- commander / gui [OPTIONAL PATH or TEST FILE]
18
+ gui / commander [OPTIONAL PATH or TEST FILE]
19
+ behave-gui (SBase Commander for Behave)
19
20
mkdir [DIRECTORY] [OPTIONS]
20
21
mkfile [FILE.py] [OPTIONS]
21
22
mkrec / codegen [FILE.py] [OPTIONS]
@@ -35,31 +36,32 @@ COMMANDS:
35
36
download server (Get Selenium Grid JAR file)
36
37
grid-hub [start|stop] [OPTIONS]
37
38
grid-node [start|stop] --hub=[HOST/IP]
38
- * (EXAMPLE: "sbase install chromedriver latest") *
39
+ * (EXAMPLE: "sbase get chromedriver latest") *
39
40
40
41
Type "sbase help [COMMAND]" for specific command info.
41
42
For info on all commands, type: "seleniumbase --help".
42
43
Use "pytest" for running tests.
43
44
```
44
45
45
- <h3 >install</h3 >
46
+ <h3 >get / install</h3 >
46
47
47
48
* Usage:
49
+ `` sbase get [DRIVER] [OPTIONS] ``
48
50
`` sbase install [DRIVER] [OPTIONS] ``
49
51
50
52
* Examples:
51
53
52
54
``` bash
53
- sbase install chromedriver
54
- sbase install geckodriver
55
- sbase install edgedriver
56
- sbase install chromedriver 101
57
- sbase install chromedriver 101.0.4951.41
58
- sbase install chromedriver latest
59
- sbase install chromedriver latest-1 # (Latest minus one)
60
- sbase install chromedriver -p
61
- sbase install chromedriver latest -p
62
- sbase install edgedriver 101.0.1210.32
55
+ sbase get chromedriver
56
+ sbase get geckodriver
57
+ sbase get edgedriver
58
+ sbase get chromedriver 101
59
+ sbase get chromedriver 101.0.4951.41
60
+ sbase get chromedriver latest
61
+ sbase get chromedriver latest-1 # (Latest minus one)
62
+ sbase get chromedriver -p
63
+ sbase get chromedriver latest -p
64
+ sbase get edgedriver 101.0.1210.32
63
65
```
64
66
65
67
(Drivers: `` chromedriver `` , `` geckodriver `` , `` edgedriver `` ,
@@ -72,11 +74,11 @@ sbase install edgedriver 101.0.1210.32
72
74
`` -p `` / `` --path `` : Also copy to "/usr/local/bin".)
73
75
74
76
* Output:
75
- Installs the specified webdriver.
77
+ Downloads the chosen webdriver to `` seleniumbase/drivers/ `` .
76
78
(`` chromedriver `` is required for Google Chrome automation)
77
79
(`` geckodriver `` is required for Mozilla Firefox automation)
78
80
(`` edgedriver `` is required for Microsoft Edge automation)
79
- (`` iedriver `` is required for Internet Explorer automation)
81
+ (`` iedriver `` is required for InternetExplorer automation)
80
82
(`` operadriver `` is required for Opera Browser automation)
81
83
82
84
<h3 >methods</h3 >
@@ -96,23 +98,24 @@ Displays common SeleniumBase Python methods.
96
98
Displays common pytest command-line options
97
99
that are available when using SeleniumBase.
98
100
99
- ```
101
+ ``` bash
100
102
--browser=BROWSER (The web browser to use. Default is " chrome" )
101
103
--headless (Run tests headlessly. Default mode on Linux OS.)
102
104
--demo (Slow down and visually see test actions as they occur.)
103
105
--slow (Slow down the automation. Faster than using Demo Mode.)
104
106
--reuse-session / --rs (Reuse browser session between tests.)
105
107
--crumbs (Clear all cookies between tests reusing a session.)
106
108
--maximize (Start tests with the web browser window maximized.)
107
- --dashboard (Enable SeleniumBase's Dashboard at dashboard.html)
108
- --incognito (Enable Chromium's Incognito mode.)
109
- --guest (Enable Chromium's Guest mode.)
109
+ --dashboard (Enable SeleniumBase\ ' s Dashboard at dashboard.html)
110
+ --incognito (Enable Chromium\ ' s Incognito mode.)
111
+ --guest (Enable Chromium\ ' s Guest mode.)
110
112
-m=MARKER (Run tests with the specified pytest marker.)
111
113
-n=NUM (Multithread the tests using that many threads.)
112
114
-v (Verbose mode. Print the full names of each test run.)
113
115
--html=report.html (Create a detailed pytest-html report.)
114
116
--collect-only / --co (Only show discovered tests. No run.)
115
117
--co -q (Only show full names of discovered tests. No run.)
118
+ -x (Stop running tests after the first failure is reached.)
116
119
--pdb (Enter the Post Mortem Debug Mode after any test fails.)
117
120
--trace (Enter Debug Mode immediately after starting any test.)
118
121
| Debug Mode Commands >>> help / h: List all commands. |
@@ -122,12 +125,11 @@ that are available when using SeleniumBase.
122
125
| longlist / ll: See code. dir (): List namespace objects. |
123
126
--recorder (Record browser actions to generate test scripts.)
124
127
--save-screenshot (Save a screenshot at the end of each test.)
125
- -x (Stop running the tests after the first failure is reached.)
126
128
--archive-logs (Archive old log files instead of deleting them.)
127
129
--check-js (Check for JavaScript errors after page loads.)
128
130
--start-page=URL (The browser start page when tests begin.)
129
- --agent=STRING (Modify the web browser's User-Agent string.)
130
- --mobile (Use Chromium's mobile device emulator during tests.)
131
+ --agent=STRING (Modify the web browser\ ' s User-Agent string.)
132
+ --mobile (Use Chromium\ ' s mobile device emulator during tests.)
131
133
--metrics=STRING (Set mobile " CSSWidth,CSSHeight,PixelRatio" .)
132
134
--ad-block (Block some types of display ads after page loads.)
133
135
--settings-file=FILE (Override default SeleniumBase settings.)
@@ -142,27 +144,85 @@ that are available when using SeleniumBase.
142
144
For the full list of command-line options, type: " pytest --help" .
143
145
` ` `
144
146
145
- <h3 >commander / gui</h3 >
147
+ < h3> behave-options< /h3>
148
+
149
+ * Usage:
150
+ ` ` sbase behave-options` `
151
+
152
+ * Output:
153
+ Displays common Behave command-line options
154
+ that are available when using SeleniumBase.
155
+
156
+ ` ` ` bash
157
+ -D browser=BROWSER (The web browser to use. Default is " chrome" )
158
+ -D headless (Run tests headlessly. Default mode on Linux OS.)
159
+ -D demo (Slow down and visually see test actions as they occur.)
160
+ -D slow (Slow down the automation. Faster than using Demo Mode.)
161
+ -D reuse-session / -D rs (Reuse browser session between tests.)
162
+ -D crumbs (Clear all cookies between tests reusing a session.)
163
+ -D maximize (Start tests with the web browser window maximized.)
164
+ -D dashboard (Enable SeleniumBase\' s Dashboard at dashboard.html)
165
+ -D incognito (Enable Chromium\' s Incognito mode.)
166
+ -D guest (Enable Chromium\' s Guest mode.)
167
+ --no-snippets / -q (Quiet mode. Don\' t print snippets.)
168
+ --dry-run / -d (Dry run. Only show discovered tests.)
169
+ --stop (Stop running tests after the first failure is reached.)
170
+ -D pdb (Enter the Post Mortem Debug Mode after any test fails.)
171
+ | Debug Mode Commands >>> help / h: List all commands. |
172
+ | n: Next line of method. s: Step through. c: Continue. |
173
+ | return / r: Run until method returns. j: Jump to line. |
174
+ | where / w: Show stack spot. u: Up stack. d: Down stack. |
175
+ | longlist / ll: See code. dir (): List namespace objects. |
176
+ -D recorder (Record browser actions to generate test scripts.)
177
+ -D save-screenshot (Save a screenshot at the end of each test.)
178
+ -D archive-logs (Archive old log files instead of deleting them.)
179
+ -D check-js (Check for JavaScript errors after page loads.)
180
+ -D start-page=URL (The browser start page when tests begin.)
181
+ -D agent=STRING (Modify the web browser\' s User-Agent string.)
182
+ -D mobile (Use Chromium\' s mobile device emulator during tests.)
183
+ -D metrics=STRING (Set mobile " CSSWidth,CSSHeight,PixelRatio" .)
184
+ -D ad-block (Block some types of display ads after page loads.)
185
+ -D settings-file=FILE (Override default SeleniumBase settings.)
186
+ -D env=ENV (Set the test env. Access with " self.env" in tests.)
187
+ -D data=DATA (Extra test data. Access with " self.data" in tests.)
188
+ -D disable-csp (Disable the Content Security Policy of websites.)
189
+ -D server=SERVER (The Selenium Grid server/IP used for tests.)
190
+ -D port=PORT (The Selenium Grid port used by the test server.)
191
+ -D proxy=SERVER:PORT (Connect to a proxy server:port for tests.)
192
+ -D proxy=USER:PASS@SERVER:PORT (Use authenticated proxy server.)
193
+
194
+ For the full list of command-line options, type: " behave --help" .
195
+ ` ` `
196
+
197
+ < h3> gui / commander< /h3>
146
198
147
199
* Usage:
148
200
149
201
` ` ` bash
150
- sbase commander [OPTIONAL PATH or TEST FILE]
151
202
sbase gui [OPTIONAL PATH or TEST FILE]
203
+ sbase commander [OPTIONAL PATH or TEST FILE]
204
+ ` ` `
205
+
206
+ < h3> behave-gui< /h3>
207
+
208
+ * Usage:
209
+
210
+ ` ` ` bash
211
+ sbase behave-gui [OPTIONAL PATH or TEST FILE]
212
+ sbase gui-behave [OPTIONAL PATH or TEST FILE]
152
213
` ` `
153
214
154
215
* Examples:
155
216
156
217
` ` ` bash
157
- sbase gui
158
- sbase gui -k agent
159
- sbase gui -m marker2
160
- sbase gui test_suite.py
161
- sbase gui offline_examples/
218
+ sbase behave-gui
219
+ sbase behave-gui -i=calculator
220
+ sbase behave-gui features/
221
+ sbase behave-gui features/calculator.feature
162
222
` ` `
163
223
164
224
* Output:
165
- Launches SeleniumBase Commander | GUI for pytest .
225
+ Launches SeleniumBase Commander | GUI for Behave .
166
226
167
227
< h3> mkdir< /h3>
168
228
0 commit comments