(msg=None)
| 36 | |
| 37 | |
| 38 | def invalid_run_command(msg=None): |
| 39 | exp = " ** mkrec / record / codegen **\n\n" |
| 40 | exp += " Usage:\n" |
| 41 | exp += " seleniumbase mkrec [FILE.py]\n" |
| 42 | exp += " OR: sbase mkrec [FILE.py]\n" |
| 43 | exp += " Examples:\n" |
| 44 | exp += " sbase mkrec new_test.py\n" |
| 45 | exp += " sbase mkrec new_test.py --url=wikipedia.org\n" |
| 46 | exp += " Options:\n" |
| 47 | exp += " --url=URL (Sets the initial start page URL.)\n" |
| 48 | exp += " --edge (Use Edge browser instead of Chrome.)\n" |
| 49 | exp += " --gui / --headed (Use headed mode on Linux.)\n" |
| 50 | exp += " --uc / --undetected (Use undetectable mode.)\n" |
| 51 | exp += " --overwrite (Overwrite file when it exists.)\n" |
| 52 | exp += " --behave (Also output Behave/Gherkin files.)\n" |
| 53 | exp += " Output:\n" |
| 54 | exp += " Creates a new SeleniumBase test using the Recorder.\n" |
| 55 | exp += " If the filename already exists, an error is raised.\n" |
| 56 | if not msg: |
| 57 | raise Exception("INVALID RUN COMMAND!\n\n%s" % exp) |
| 58 | elif msg == "help": |
| 59 | print("\n%s" % exp) |
| 60 | sys.exit() |
| 61 | else: |
| 62 | raise Exception("INVALID RUN COMMAND!\n\n%s\n%s\n" % (exp, msg)) |
| 63 | |
| 64 | |
| 65 | def set_colors(use_colors): |
no outgoing calls
no test coverage detected
searching dependent graphs…