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.
"""