github seleniumbase/SeleniumBase v1.49.15
Update console scripts for the page-objects generator

latest releases: v4.27.0, v4.26.4, v4.26.3...
3 years ago

Update console scripts for the page-objects generator

  • Update the console scripts tool for generating page objects
  • Also optimize colorama / speed up console scripts output
  • Also update the Python rich requirement to version 7.0.0

(See https://www.youtube.com/watch?v=Sjzq9kU5kOw to learn how the page-objects generator works)


Summary of the console scripts' tools for generating page objects:

  ** extract-objects **

  Usage:
           seleniumbase extract-objects [SELENIUMBASE_PYTHON_FILE]
           OR:    sbase extract-objects [SELENIUMBASE_PYTHON_FILE]
  Output:
           Creates page objects based on selectors found in a
           seleniumbase Python file and saves those objects to the
           "page_objects.py" file in the same folder as the tests.

  ** inject-objects **

  Usage:
           seleniumbase inject-objects [SELENIUMBASE_PYTHON_FILE]
           OR:    sbase inject-objects [SELENIUMBASE_PYTHON_FILE]
  Options:
           -c, --comments  (Add object selectors to the comments.)
                           (Default: No added comments.)
  Output:
           Takes the page objects found in the "page_objects.py"
           file and uses those to replace matching selectors in
           the selected seleniumbase Python file.

  ** objectify **

  Usage:
           seleniumbase objectify [SELENIUMBASE_PYTHON_FILE]
           OR:    sbase objectify [SELENIUMBASE_PYTHON_FILE]
  Options:
           -c, --comments  (Add object selectors to the comments.)
                           (Default: No added comments.)
  Output:
           A modified version of the file where the selectors
           have been replaced with variable names defined in
           "page_objects.py", supporting the Page Object Pattern.

           (seleniumbase "objectify" has the same outcome as
            combining "extract-objects" with "inject-objects")

  ** revert-objects **

  Usage:
           seleniumbase revert-objects [SELENIUMBASE_PYTHON_FILE]
           OR:    sbase revert-objects [SELENIUMBASE_PYTHON_FILE]
  Options:
           -c, --comments  (Keep existing comments for the lines.)
                           (Default: No comments are kept.)
  Output:
           Reverts the changes made by "seleniumbase objectify" or
           "seleniumbase inject-objects" when run against a
           seleniumbase Python file. Objects will get replaced by
           selectors stored in the "page_objects.py" file.

Don't miss a new SeleniumBase release

NewReleases is sending notifications on new releases.