Console scripts for the chart generator and the presentation generator are missing the BaseCase.main(__name__, __file__) line, which allows running directly with python instead of pytest. The test generator could also use some refactoring.
For a refresher, here are the descriptions of those console scripts / commands:
** mkchart **
Usage:
seleniumbase mkchart [FILE.py] [LANG]
OR: sbase mkchart [FILE.py] [LANG]
Example:
sbase mkchart new_chart.py --en
Language Options:
--en / --English | --zh / --Chinese
--nl / --Dutch | --fr / --French
--it / --Italian | --ja / --Japanese
--ko / --Korean | --pt / --Portuguese
--ru / --Russian | --es / --Spanish
Output:
Creates a new SeleniumBase chart presentation.
If the file already exists, an error is raised.
By default, the slides are written in English,
and use a "sky" theme with "slide" transition.
The chart can be used as a basic boilerplate.
** mkpres **
Usage:
seleniumbase mkpres [FILE.py] [LANG]
OR: sbase mkpres [FILE.py] [LANG]
Example:
sbase mkpres new_presentation.py --en
Language Options:
--en / --English | --zh / --Chinese
--nl / --Dutch | --fr / --French
--it / --Italian | --ja / --Japanese
--ko / --Korean | --pt / --Portuguese
--ru / --Russian | --es / --Spanish
Output:
Creates a new presentation with 3 example slides.
If the file already exists, an error is raised.
By default, the slides are written in English,
and use "serif" theme with "slide" transition.
The slides can be used as a basic boilerplate.
** mkfile **
Usage:
seleniumbase mkfile [FILE.py] [OPTIONS]
OR: sbase mkfile [FILE.py] [OPTIONS]
Example:
sbase mkfile new_test.py
Options:
-b / --basic (Basic boilerplate / single-line test)
-r / --rec (adds Pdb+ breakpoint for Recorder Mode)
Language Options:
--en / --English | --zh / --Chinese
--nl / --Dutch | --fr / --French
--it / --Italian | --ja / --Japanese
--ko / --Korean | --pt / --Portuguese
--ru / --Russian | --es / --Spanish
Syntax Formats:
--bc / --basecase (BaseCase class inheritance)
--pf / --pytest-fixture (sb pytest fixture)
--cf / --class-fixture (class + sb pytest fixture)
--cm / --context-manager (SB context manager)
--dc / --driver-context (DriverContext manager)
--dm / --driver-manager (Driver manager)
Output:
Creates a new SBase test file with boilerplate code.
If the file already exists, an error is raised.
By default, uses English with BaseCase inheritance,
and creates a boilerplate with common SeleniumBase
methods: "open", "type", "click", "assert_element",
and "assert_text". If using the basic boilerplate
option, only the "open" method is included. Only the
BaseCase format supports Languages or Recorder Mode.
Refactor file generators
Console scripts for the chart generator and the presentation generator are missing the
BaseCase.main(__name__, __file__)
line, which allows running directly withpython
instead ofpytest
. The test generator could also use some refactoring.For a refresher, here are the descriptions of those console scripts / commands: