MCPcopy Create free account
hub / github.com/seleniumbase/SeleniumBase / invalid_run_command

Function invalid_run_command

seleniumbase/console_scripts/sb_mkfile.py:48–89  ·  view source on GitHub ↗
(msg=None)

Source from the content-addressed store, hash-verified

46
47
48def invalid_run_command(msg=None):
49 exp = " ** mkfile **\n\n"
50 exp += " Usage:\n"
51 exp += " seleniumbase mkfile [FILE.py] [OPTIONS]\n"
52 exp += " OR sbase mkfile [FILE.py] [OPTIONS]\n"
53 exp += " Example:\n"
54 exp += " sbase mkfile new_test.py\n"
55 exp += " Options:\n"
56 exp += " --uc (UC Mode boilerplate using SB context manager)\n"
57 exp += " -b / --basic (Basic boilerplate / single-line test)\n"
58 exp += " -r / --rec (Adds Pdb+ breakpoint for Recorder Mode)\n"
59 exp += " --url=URL (Makes the test start on a specific page)\n"
60 exp += " Language Options:\n"
61 exp += " --en / --English | --zh / --Chinese\n"
62 exp += " --nl / --Dutch | --fr / --French\n"
63 exp += " --it / --Italian | --ja / --Japanese\n"
64 exp += " --ko / --Korean | --pt / --Portuguese\n"
65 exp += " --ru / --Russian | --es / --Spanish\n"
66 exp += " Syntax Formats:\n"
67 exp += " --bc / --basecase (BaseCase class inheritance)\n"
68 exp += " --pf / --pytest-fixture (sb pytest fixture)\n"
69 exp += " --cf / --class-fixture (class + sb pytest fixture)\n"
70 exp += " --cm / --context-manager (SB context manager)\n"
71 exp += " --dc / --driver-context (DriverContext manager)\n"
72 exp += " --dm / --driver-manager (Driver manager)\n"
73 exp += " Output:\n"
74 exp += " Creates a new SBase test file with boilerplate code.\n"
75 exp += " If the file already exists, an error is raised.\n"
76 exp += " By default, uses English with BaseCase inheritance,\n"
77 exp += " and creates a boilerplate with common SeleniumBase\n"
78 exp += ' methods: "open", "type", "click", "assert_element",\n'
79 exp += ' and "assert_text". If using the basic boilerplate\n'
80 exp += ' option, only the "open" method is included. Only the\n'
81 exp += " BaseCase format supports Languages or Recorder Mode.\n"
82 exp += " UC Mode automatically uses English with SB() format.\n"
83 if not msg:
84 raise Exception("INVALID RUN COMMAND!\n\n%s" % exp)
85 elif msg == "help":
86 print("\n%s" % exp)
87 sys.exit()
88 else:
89 raise Exception("INVALID RUN COMMAND!\n\n%s\n%s\n" % (exp, msg))
90
91
92def main():

Callers 2

mainFunction · 0.70
sb_mkfile.pyFile · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…