Skip to content

New console scripts for manipulating page objects #286

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Feb 26, 2019

Conversation

mdmintz
Copy link
Member

@mdmintz mdmintz commented Feb 26, 2019

New console scripts for manipulating page objects:

"seleniumbase" ...

+ "extract-objects"

  Usage:
           seleniumbase 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]
  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]
  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]
  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.

@mdmintz mdmintz merged commit 2496d17 into master Feb 26, 2019
@mdmintz mdmintz deleted the new-console-scripts branch February 26, 2019 09:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant