Add "sbase" as a shorter "seleniumbase" for console scripts

This commit is contained in:
Michael Mintz 2020-05-25 04:21:59 -04:00
parent aec1b75703
commit 177687019e
3 changed files with 11 additions and 2 deletions

View File

@ -38,7 +38,9 @@ def main():
dir_path = os.path.dirname(os.path.realpath(__file__))
num_args = len(sys.argv)
if sys.argv[0].split('/')[-1] == "seleniumbase" or (
sys.argv[0].split('\\')[-1] == "seleniumbase"):
sys.argv[0].split('\\')[-1] == "seleniumbase") or (
sys.argv[0].split('/')[-1] == "sbase") or (
sys.argv[0].split('\\')[-1] == "sbase"):
if num_args < 3:
invalid_run_command()
else:

View File

@ -54,7 +54,9 @@ def main():
dir_path = os.path.dirname(os.path.realpath(__file__))
num_args = len(sys.argv)
if sys.argv[0].split('/')[-1] == "seleniumbase" or (
sys.argv[0].split('\\')[-1] == "seleniumbase"):
sys.argv[0].split('\\')[-1] == "seleniumbase") or (
sys.argv[0].split('/')[-1] == "sbase") or (
sys.argv[0].split('\\')[-1] == "sbase"):
if num_args < 3:
invalid_run_command()
else:

View File

@ -30,6 +30,11 @@ def main():
if num_args < 3 or num_args > 3:
raise Exception('\n\n* INVALID RUN COMMAND! * Usage:\n'
'"seleniumbase convert %s"\n' % expected_arg)
elif sys.argv[0].split('/')[-1] == "sbase" or (
sys.argv[0].split('\\')[-1] == "sbase"):
if num_args < 3 or num_args > 3:
raise Exception('\n\n* INVALID RUN COMMAND! * Usage:\n'
'"sbase convert %s"\n' % expected_arg)
else:
if num_args < 2 or num_args > 2:
raise Exception('\n\n* INVALID RUN COMMAND! * Usage:\n'