Releases: seleniumbase/SeleniumBase
Releases · seleniumbase/SeleniumBase
Invoke console scripts with: "python -m seleniumbase"
Invoke console scripts with: python -m seleniumbase <COMMAND>
You can now do:
python -m seleniumbase <COMMAND>python -m sbase <COMMAND>
Or to list all commands, run:
python -m seleniumbasepython -m sbase
You can still use seleniumbase or sbase by itself.
Add "protocol" option for selecting a Selenium Grid server
Add protocol option for selecting a Selenium Grid server.
- Protocol usage:
--protocol=httpOR--protocol=https.
-- (Only used when selecting a Selenium Grid server to connect to.) - Also, use two decimal places for dashboard times in seconds.
- Also, update Python dependencies:
--sortedcontainers==2.4.0
--decorator==5.0.9;python_version>="3.5"
--rich==10.2.1;python_version>="3.6"
Update visual baseline folder naming and dependencies
Update visual baseline folder naming and dependencies
- Fix #903 by making the visual layout comparison be done against
test/nameinstead offile_class_test/name. This lets two different tests (same name, but located in different files/classes) be able to do a visual layout comparison against each other. - Also update Python dependencies: (
rich==10.2.0;python_version>="3.6")
Compatibility updates and more
Compatibility updates and more
- Improve compatibility on older versions of Python.
- Use the IPython debugger by default (
ipdb). - Update Python dependencies:
--setuptools>=56.2.0;python_version>="3.6"
--decorator==5.0.7;python_version>="3.5"
Perform code optimization
Perform code optimization
- The code is now fully
flake8compliant andblackcompliant. - The
sbase mkdir DIRcommand now generates optimized code. - (
flake8is still the law of the land for CI builds.) - Update a Python dependency: (
attrs>=21.2.0) - Update universal translations: (related to file downloads)
For more info about flake8 and black, see:
Update console scripts and dashboard display
Update console scripts and dashboard display
- Update console script:
sbase mkdir DIR - Update output of console script:
sbase options - Display Dashboard tests with logs before ones without logs.
- Continue refactoring the code with Python
black. - Update Python dependencies:
--setuptools>=56.1.0;python_version>="3.6"
--six==1.16.0
--pytest==6.2.4;python_version>="3.6"
--ipython==7.23.1;python_version>="3.7"
--virtualenv>=20.4.6
Initial Python "black" refactoring
Initial Python "black" refactoring
- Optimize code with syntax refactoring using https://github.com/psf/black
-- ("The uncompromising Python code formatter") - Also update Python dependencies:
--typing-extensions>=3.10.0.0
--pygments==2.9.0;python_version>="3.5"
--ipython==7.23.0;python_version>="3.7"
--matplotlib-inline==0.1.2;python_version>="3.7"
Dashboard upgrades and a lot more
Dashboard upgrades and a lot more
- Use color-coded rows for Dashboard results (Eg. Red =>
failed). - For any test that generates logs, include that link on the Dashboard.
- Log "skip reason" data about tests that are marked as
skipped. - Make Dashboard resources available locally (CSS / JS / favicon).
- Add method for saving a screenshot directly to the logs.
- Add methods for asserting the attribute of an element.
- Add methods to get the versions of Chrome and chromedriver.
- Add method for checking if the version of chromedriver is too old.
- Update Python dependencies (
pip>=21.1.1). - Fix issue with browser selection during multithreaded mode.
- Fix issue that may cause the page source to render incorrectly.
- Update the
ad_block_list. - Update Dutch translations to use "attribuut" instead of "kenmerk".
- Refactor imports and exception-handling code.
- Improve Dashboard processing speed.
New methods added:
self.save_screenshot_to_logs(name=None) # Link added to Dashboard
"""
Saves a screenshot of the current page to the "latest_logs" folder.
Naming is automatic:
If NO NAME provided: "_1_screenshot.png", "_2_screenshot.png", etc.
If NAME IS provided, it becomes: "_1_name.png", "_2_name.png", etc.
(The last_page / failure screenshot is always "screenshot.png")
The screenshot will be in PNG format.
"""
self.wait_for_attribute(selector, attribute, value=None,
by=By.CSS_SELECTOR, timeout=None)
"""
Raises an exception if the element attribute/value is not found.
If the value is not specified, the attribute only needs to exist.
Returns the element that contains the attribute if successful.
Default timeout = LARGE_TIMEOUT.
"""
self.assert_attribute(selector, attribute, value=None,
by=By.CSS_SELECTOR, timeout=None)
"""
Raises an exception if the element attribute/value is not found.
If the value is not specified, the attribute only needs to exist.
Returns True if successful.
Default timeout = SMALL_TIMEOUT.
"""
self.get_chrome_version() # If not on Chrome, raise exception
self.get_chromedriver_version() # If not on Chrome, raise exception
self.is_chromedriver_too_old() # ("old" means chromedriver < 73)
"""
There are known issues with chromedriver versions below 73.
This can impact tests that need to hover over an element, or ones
that require a custom downloads folder ("./downloaded_files").
Due to the situation that newer versions of chromedriver require
an exact match to the version of Chrome, an "old" version of
chromedriver is installed by default. It is then up to the user
to upgrade to the correct version of chromedriver from there.
This method can be used to change test behavior when trying
to perform an action that is impacted by having an old version
of chromedriver installed.
"""Prevent duplicate setUp/tearDown; and remove a dependency
New methods and commands
New methods and commands
- Add a console script for generating boilerplate charts.
- Add methods for setting and resetting default timeout values.
- Add
open_start_page()method. - Add
set_content(html_string)method. - Add
fill(selector, text)method. - Add
focus(selector)method. - Fix an issue with duplicate Highcharts library declarations.
- Update an error message.
- Update translations.
- Update a Python dependency:
--virtualenv>=20.4.4. - Refactor "base_case.py".