mdmintz
released this
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
richrequirement to version7.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.
Assets
2
mdmintz
released this
Improve file downloads - disable automation prompts
- Prevent download prompts from appearing (On Chrome, Firefox, and Edge)
- Update the default timeout for asserting downloaded files
- Update the Python requirements
--coverage==5.3
--rich==6.2.0
Assets
2
mdmintz
released this
Update Python dependencies
pytest==6.0.2;python_version>="3.5"pygments==2.7.0;python_version>="3.5"
Assets
2
mdmintz
released this
Update presentation metadata and more
- Update metadata for generated presentations (Fixes mobile view)
- Also verify URL has fully loaded before calling
assert_title(TITLE) - Also update the
richrequirement:rich==6.1.2
Assets
2
mdmintz
released this
Add expected methods
- Add
self.clear(SELECTOR) - Add
self.set_text(SELECTOR, TEXT) - Update SeleniumBase translations
- Also set the
pymysqlrequirement to version0.10.1
Reasoning for the duplicate methods:
- Although most methods that type text already clear out the text field first, and although clearing out the text field can already be done with
self.type(SELECTOR, ""), I'm adding theself.clear(SELECTOR)method to avoid confusion because developers will expect that method to exist. - Developers would also expect there to be a
self.set_text(SELECTOR, TEXT)method (even though methods already exist that do the same thing) because there's aself.get_text(SELECTOR)method and aself.set_attribute(SELECTOR, ATTRIBUTE, VALUE)method, which sound similar.
Assets
2
mdmintz
released this
Update the display of console scripts
- Make sure to initialize
coloramabefore using it - Fix display incompatibilities on different platforms
Assets
2
mdmintz
released this
Updates to the css-to-xpath selector converter
"""
An implementation of :py:class:`cssselect.GenericTranslator` with
XPath output that more readily converts back to CSS selectors.
The simplified examples in https://devhints.io/xpath were used as a
reference here.
"""
Assets
2
mdmintz
released this
Another update to the xpath-to-css converter
- Handle the case of
//in the middle of an xpath selector
Example:
self.convert_xpath_to_css("//section//p/p//div")
'section p > p div'See the xpath cheatsheet for more details: https://devhints.io/xpath
Assets
2
mdmintz
released this
Update the xpath-to-css selector converter
- Handle special xpath edge cases that weren't covered by the main converter

Formed in 2009, the Archive Team (not to be confused with the archive.org Archive-It Team) is a rogue archivist collective dedicated to saving copies of rapidly dying or deleted websites for the sake of history and digital heritage. The group is 100% composed of volunteers and interested parties, and has expanded into a large amount of related projects for saving online and digital history.
