Skip to content

Commit ac01dc0

Browse files
committed
Simplify SeleniumBase console scripts
1 parent 5422bc0 commit ac01dc0

File tree

7 files changed

+47
-47
lines changed

7 files changed

+47
-47
lines changed

seleniumbase/console_scripts/ReadMe.md

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ SeleniumBase console scripts help you get things done more easily, such as insta
1515
### install
1616

1717
* Usage:
18-
``sbase install [DRIVER_NAME] [VERSION]``
18+
``sbase install [DRIVER] [VERSION]``
1919
(Drivers: ``chromedriver``, ``geckodriver``, ``edgedriver``,
2020
``iedriver``, ``operadriver``)
2121
(Versions: ``latest`` or a specific driver version.
@@ -38,10 +38,10 @@ Installs the specified webdriver.
3838
### mkdir
3939

4040
* Usage:
41-
``sbase mkdir [DIRECTORY_NAME]``
41+
``sbase mkdir [DIRECTORY]``
4242

4343
* Example:
44-
``sbase mkdir browser_tests``
44+
``sbase mkdir ui_tests``
4545

4646
* Output:
4747
Creates a new folder for running SeleniumBase scripts.
@@ -53,7 +53,7 @@ test frameworks.
5353
### mkfile
5454

5555
* Usage:
56-
``sbase mkfile [FILE_NAME.py] [OPTIONS]``
56+
``sbase mkfile [FILE.py] [OPTIONS]``
5757

5858
* Example:
5959
``sbase mkfile new_test.py``
@@ -90,7 +90,7 @@ that are available when using SeleniumBase.
9090
### convert
9191

9292
* Usage:
93-
``sbase convert [PYTHON_WEBDRIVER_UNITTEST_FILE]``
93+
``sbase convert [WEBDRIVER_UNITTEST_FILE.py]``
9494

9595
* Output:
9696
Converts a Selenium IDE exported WebDriver unittest file
@@ -114,7 +114,7 @@ with syntax-highlighting.
114114
### translate
115115

116116
* Usage:
117-
``sbase translate [SB_FILE].py [LANGUAGE] [ACTION]``
117+
``sbase translate [SB_FILE.py] [LANGUAGE] [ACTION]``
118118

119119
* Languages:
120120
``--en`` / ``--English`` | ``--zh`` / ``--Chinese``
@@ -146,7 +146,7 @@ plus the 2-letter language code of the new language.
146146
### extract-objects
147147

148148
* Usage:
149-
``sbase extract-objects [SB_PYTHON_FILE]``
149+
``sbase extract-objects [SB_FILE.py]``
150150

151151
* Output:
152152
Creates page objects based on selectors found in a
@@ -156,7 +156,7 @@ seleniumbase Python file and saves those objects to the
156156
### inject-objects
157157

158158
* Usage:
159-
``sbase inject-objects [SB_PYTHON_FILE] [OPTIONS]``
159+
``sbase inject-objects [SB_FILE.py] [OPTIONS]``
160160

161161
* Options:
162162
``-c``, ``--comments`` (Add object selectors to the comments.)
@@ -169,7 +169,7 @@ the selected seleniumbase Python file.
169169
### objectify
170170

171171
* Usage:
172-
``sbase objectify [SB_PYTHON_FILE] [OPTIONS]``
172+
``sbase objectify [SB_FILE.py] [OPTIONS]``
173173

174174
* Options:
175175
``-c``, ``--comments`` (Add object selectors to the comments.)
@@ -184,7 +184,7 @@ have been replaced with variable names defined in
184184
### revert-objects
185185

186186
* Usage:
187-
``sbase revert-objects [SB_PYTHON_FILE] [OPTIONS]``
187+
``sbase revert-objects [SB_FILE.py] [OPTIONS]``
188188

189189
* Options:
190190
``-c``, ``--comments`` (Keep existing comments for the lines.)

seleniumbase/console_scripts/run.py

Lines changed: 28 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,10 @@
77
88
Examples:
99
sbase install chromedriver
10-
sbase mkdir browser_tests
10+
sbase mkdir ui_tests
1111
sbase mkfile new_test.py
1212
sbase options
13-
sbase convert old_webdriver_unittest.py
13+
sbase convert webdriver_unittest_file.py
1414
sbase print my_first_test.py -n
1515
sbase translate my_first_test.py --zh -p
1616
sbase extract-objects my_first_test.py
@@ -60,22 +60,22 @@ def show_basic_usage():
6060
sc += (' * OR: "sbase [COMMAND] [PARAMETERS]"\n')
6161
sc += ("\n")
6262
sc += ("COMMANDS:\n")
63-
sc += (" install [DRIVER_NAME] [OPTIONS]\n")
64-
sc += (" mkdir [DIRECTORY_NAME]\n")
65-
sc += (" mkfile [FILE_NAME.py]\n")
66-
sc += (" options (display common pytest options)\n")
67-
sc += (" convert [PYTHON_WEBDRIVER_UNITTEST_FILE]\n")
63+
sc += (" install [DRIVER] [OPTIONS]\n")
64+
sc += (" mkdir [DIRECTORY]\n")
65+
sc += (" mkfile [FILE.py]\n")
66+
sc += (" options (List common pytest options)\n")
67+
sc += (" convert [WEBDRIVER_UNITTEST_FILE.py]\n")
6868
sc += (" print [FILE] [OPTIONS]\n")
69-
sc += (" translate [SB_PYTHON_FILE] [LANGUAGE] [ACTION]\n")
70-
sc += (" extract-objects [SB_PYTHON_FILE]\n")
71-
sc += (" inject-objects [SB_PYTHON_FILE] [OPTIONS]\n")
72-
sc += (" objectify [SB_PYTHON_FILE] [OPTIONS]\n")
73-
sc += (" revert-objects [SB_PYTHON_FILE]\n")
69+
sc += (" translate [SB_FILE.py] [LANG] [ACTION]\n")
70+
sc += (" extract-objects [SB_FILE.py]\n")
71+
sc += (" inject-objects [SB_FILE.py] [OPTIONS]\n")
72+
sc += (" objectify [SB_FILE.py] [OPTIONS]\n")
73+
sc += (" revert-objects [SB_FILE.py]\n")
7474
sc += (" encrypt (OR: obfuscate)\n")
7575
sc += (" decrypt (OR: unobfuscate)\n")
7676
sc += (" download server (Selenium Server JAR file)\n")
7777
sc += (" grid-hub [start|stop] [OPTIONS]\n")
78-
sc += (" grid-node [start|stop] --hub=[HUB_IP] [OPTIONS]\n")
78+
sc += (" grid-node [start|stop] --hub=[HOST/IP]\n")
7979
sc += (' * (EXAMPLE: "sbase install chromedriver latest") *\n')
8080
sc += ("")
8181
if "linux" not in sys.platform:
@@ -150,8 +150,8 @@ def show_mkfile_usage():
150150
print(sc)
151151
print("")
152152
print(" Usage:")
153-
print(" seleniumbase mkfile [FILE_NAME.py]")
154-
print(" OR: sbase mkfile [FILE_NAME.py]")
153+
print(" seleniumbase mkfile [FILE.py]")
154+
print(" OR: sbase mkfile [FILE.py]")
155155
print(" Example:")
156156
print(" sbase mkfile new_test.py")
157157
print(" Options:")
@@ -182,8 +182,8 @@ def show_convert_usage():
182182
print(sc)
183183
print("")
184184
print(" Usage:")
185-
print(" seleniumbase convert [PYTHON_WEBDRIVER_UNITTEST_FILE]")
186-
print(" OR: sbase convert [PYTHON_WEBDRIVER_UNITTEST_FILE]")
185+
print(" seleniumbase convert [WEBDRIVER_UNITTEST_FILE.py]")
186+
print(" OR: sbase convert [WEBDRIVER_UNITTEST_FILE.py]")
187187
print(" Output:")
188188
print(" Converts a Selenium IDE exported WebDriver unittest")
189189
print(" file into a SeleniumBase file. Adds _SB to the new")
@@ -254,8 +254,8 @@ def show_extract_objects_usage():
254254
print(sc)
255255
print("")
256256
print(" Usage:")
257-
print(" seleniumbase extract-objects [SELENIUMBASE_PYTHON_FILE]")
258-
print(" OR: sbase extract-objects [SELENIUMBASE_PYTHON_FILE]")
257+
print(" seleniumbase extract-objects [SB_FILE.py]")
258+
print(" OR: sbase extract-objects [SB_FILE.py]")
259259
print(" Output:")
260260
print(" Creates page objects based on selectors found in a")
261261
print(" seleniumbase Python file and saves those objects to the")
@@ -271,8 +271,8 @@ def show_inject_objects_usage():
271271
print(sc)
272272
print("")
273273
print(" Usage:")
274-
print(" seleniumbase inject-objects [SELENIUMBASE_PYTHON_FILE]")
275-
print(" OR: sbase inject-objects [SELENIUMBASE_PYTHON_FILE]")
274+
print(" seleniumbase inject-objects [SB_FILE.py]")
275+
print(" OR: sbase inject-objects [SB_FILE.py]")
276276
print(" Options:")
277277
print(" -c, --comments (Add object selectors to the comments.)")
278278
print(" (Default: No added comments.)")
@@ -291,8 +291,8 @@ def show_objectify_usage():
291291
print(sc)
292292
print("")
293293
print(" Usage:")
294-
print(" seleniumbase objectify [SELENIUMBASE_PYTHON_FILE]")
295-
print(" OR: sbase objectify [SELENIUMBASE_PYTHON_FILE]")
294+
print(" seleniumbase objectify [SB_FILE.py]")
295+
print(" OR: sbase objectify [SB_FILE.py]")
296296
print(" Options:")
297297
print(" -c, --comments (Add object selectors to the comments.)")
298298
print(" (Default: No added comments.)")
@@ -314,8 +314,8 @@ def show_revert_objects_usage():
314314
print(sc)
315315
print("")
316316
print(" Usage:")
317-
print(" seleniumbase revert-objects [SELENIUMBASE_PYTHON_FILE]")
318-
print(" OR: sbase revert-objects [SELENIUMBASE_PYTHON_FILE]")
317+
print(" seleniumbase revert-objects [SB_FILE.py]")
318+
print(" OR: sbase revert-objects [SB_FILE.py]")
319319
print(" Options:")
320320
print(" -c, --comments (Keep existing comments for the lines.)")
321321
print(" (Default: No comments are kept.)")
@@ -415,10 +415,10 @@ def show_grid_node_usage():
415415
print(" seleniumbase grid-node {start|stop|restart} [OPTIONS]")
416416
print(" OR: sbase grid-node {start|stop|restart} [OPTIONS]")
417417
print(" Options:")
418-
print(" --hub=[HUB_IP] (The Grid Hub IP Address to connect to.)")
419-
print(" (Default: 127.0.0.1 if not set)")
418+
print(" --hub=[HOST/IP] (The Grid Hub Hostname / IP Address.)")
419+
print(" (Default: 127.0.0.1 if not set.)")
420420
print(" -v, --verbose (Increase verbosity of logging output.)")
421-
print(" (Default: Quiet logging / not verbose.)")
421+
print(" (Default: Quiet logging / Not verbose.)")
422422
print(" Example:")
423423
print(" seleniumbase grid-node start --hub=127.0.0.1")
424424
print(" Output:")

seleniumbase/console_scripts/sb_mkdir.py

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,11 @@
22
Creates a new folder for running SeleniumBase scripts.
33
44
Usage:
5-
seleniumbase mkdir [DIRECTORY_NAME]
6-
OR sbase mkdir [DIRECTORY_NAME]
5+
seleniumbase mkdir [DIRECTORY]
6+
OR sbase mkdir [DIRECTORY]
77
88
Example:
9-
sbase mkdir browser_tests
9+
sbase mkdir ui_tests
1010
1111
Output:
1212
Creates a new folder for running SBase scripts.
@@ -145,7 +145,9 @@ def main():
145145
data.append("lib64")
146146
data.append("__pycache__")
147147
data.append("env")
148+
data.append("ENV")
148149
data.append("venv")
150+
data.append("VENV")
149151
data.append("sbase")
150152
data.append("sbase*")
151153
data.append("seleniumbase_env")

seleniumbase/console_scripts/sb_mkfile.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@
33
Creates a new SeleniumBase test file with boilerplate code.
44
55
Usage:
6-
seleniumbase mkfile [FILE_NAME.py] [OPTIONS]
7-
or sbase mkfile [FILE_NAME.py] [OPTIONS]
6+
seleniumbase mkfile [FILE.py] [OPTIONS]
7+
or sbase mkfile [FILE.py] [OPTIONS]
88
99
Example:
1010
sbase mkfile new_test.py
@@ -39,8 +39,8 @@
3939
def invalid_run_command(msg=None):
4040
exp = (" ** mkfile **\n\n")
4141
exp += " Usage:\n"
42-
exp += " seleniumbase mkfile [FILE_NAME.py] [OPTIONS]\n"
43-
exp += " OR sbase mkfile [FILE_NAME.py] [OPTIONS]\n"
42+
exp += " seleniumbase mkfile [FILE.py] [OPTIONS]\n"
43+
exp += " OR sbase mkfile [FILE.py] [OPTIONS]\n"
4444
exp += " Example:\n"
4545
exp += " sbase mkfile new_test.py\n"
4646
exp += " Options:\n"

virtualenv_install.sh

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@
77
[[ $0 != "$BASH_SOURCE" ]] && sourced=1 || sourced=0
88
if [ $sourced = 1 ]
99
then
10-
python3 -m pip install pip wheel --force-reinstall
1110
python3 -m pip install virtualenvwrapper --force-reinstall
1211
export WORKON_HOME=$HOME/.virtualenvs
1312
source `which virtualenvwrapper.sh`
File renamed without changes.

virtualenv_install.bat renamed to win_virtualenv.bat

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
:: virtualenv commands such as "mkvirtualenv [ENV_NAME]"
44
:: for creating and using Python virtual environments.
55

6-
py -m pip install pip wheel --force-reinstall --user
76
py -m pip install virtualenvwrapper-win --force-reinstall --user
87
echo:
98
echo:

0 commit comments

Comments
 (0)