Releases: seleniumbase/SeleniumBase
Releases · seleniumbase/SeleniumBase
Refactor and minify Messenger CSS resources
Refactor and minify Messenger CSS resources
- Refactor and minify Messenger resources
- Add a double_click() test
- Update "pytest" and "parameterized" dependencies
Add the inspect_html() method
Add the inspect_html()
method
This uses https://cdnjs.com/libraries/html-inspector
and https://github.com/philipwalton/html-inspector
Sample code:
from seleniumbase import BaseCase
class MyTestClass(BaseCase):
def test_html_inspector(self):
self.open("https://xkcd.com/1144/")
self.inspect_html()
Run command:
pytest test_inspect_html.py
Sample output:
* HTML Inspection Results: https://xkcd.com/1144/
X - https://xkcd.com/usNews - Failed to load resource: the server responded with a status of 404 (Not Found)
X - 'property' is not a valid attribute of the <meta> element.
X - Do not use <div> or <span> elements without any attributes.
X - The 'alt' attribute is required for <img> elements.
X - The 'border' attribute is no longer valid on the <img> element and should not be used.
X - 'srcset' is not a valid attribute of the <img> element.
X - The <center> element is obsolete and should not be used.
X - <script> elements should appear right before the closing </body> tag for optimal performance.
X - The id 'comicLinks' appears more than once in the document.
* (See the Console output for details!)
Update pytest, portalocker, and improve error-handling
Update pytest, portalocker, and improve error-handling
- Update
pytest
- Update
portalocker
- Allow the
update_text()
method to handle ints and floats as text - Improve some error messages if/when they occur
Update methods
Update methods
- Add the save_page_source(file_name) method
- Update tqdm dependency to >= 4.38.0
Add "Slow Mode"
Add "Slow Mode"
- Add "Slow Mode". Usage:
--slow
- Upgrade the "six" dependency to ">=1.13.0"
Slow Mode is similar to Demo Mode, except that SeleniumBase skips highlighting the elements being interacted with.
Update pytest discovery rules
Update pytest discovery rules
python_files = test_*.py *_test.py *_tests.py *_suite.py
python_classes = Test* *Test* *Test *Tests *Suite
python_functions = test_*
Improve Test Automation on Safari
Improve Test Automation on Safari
- Improved clicking in Safari tests
- Better exception-handling with element.clear() in update_text()
- Fix a Safari bug with forward and backward page navigation
- Add the input() method as a shorter version of update_text()
- Handle an edge case with Safari LINK_TEXT selectors
- Update a Python dependency (cffi>=1.13.2)
Update setuptools and tqdm versions
Update setuptools and tqdm versions
Requirements update
Requirements update
- Update
setuptools
version - Update
flake8
version - Also update some ReadMe files
Pytest update
Pytest update
pytest>=4.6.6;python_version<"3"
pytest>=5.2.2;python_version>="3"