Releases: seleniumbase/SeleniumBase
Releases · seleniumbase/SeleniumBase
Add the ability to set the User-Agent for the browser
Add the ability to set the User-Agent for the browser:
- Usage:
--agent="USER-AGENT STRING"
Example:
pytest user_agent_test.py --agent="Mozilla/5.0 (Nintendo 3DS; U; ; en) Version/1.7412.EU"
Other changes:
- Fix the Docker integration
- Update console scripts for page-object manipulation
- Update several ReadMe files
New console scripts for manipulating page objects
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.
Update webdriver installation script
Update webdriver installation script:
seleniumbase install chromedriver
will now install chromedriver v2.46, except on Linux machines, which may be using older versions of Chromeseleniumbase install geckodriver
will now install v0.24.0 (for Firefox)seleniumbase install operadriver
will now install v.2.40
Other changes:
- Update starting browser dimensions
Update requirements
Update requirements:
- Update pytest to v4.3.0
Clone an existing method with an additional name
Clone an existing method with an additional name:
- Add
self.assert_element_visible(CSS_SELECTOR)
, which does the same thing asself.assert_element(CSS_SELECTOR)
.
Adding exact text methods and other improvements
Adding exact text methods and other improvements:
- Add
self.assert_exact_text()
- Add
self.wait_for_exact_text_visible()
- Update pytest version to 4.2.1
- Adding more reliability to some methods
- Fix a bug with text assertion
Fix Python 2 compatibility
Fix Python 2 compatibility:
- Use more-itertools version >=5.0.0,<6.0.0
Update parameterized version
Update parameterized version:
- Set
parameterized>=0.7.0
Update examples
Mostly updating example tests to use a non-camelCase format for assertions.
self.assert_true()
can now be used in place ofself.assertTrue()
self.assert_equal()
can now be used in place ofself.assertEqual()
Save the URL with exported SeleniumBase tours
Tour update:
- Save the URL with exported SeleniumBase JavaScript tours