Webdriver-test-tools

Latest version: v3.2.0

Safety actively analyzes 706259 Python packages for vulnerabilities to keep your Python projects secure.

Scan your dependencies

Page 2 of 5

2.12.1

No code changes, but added documentation

2.12.0

A collapsible variant of an existing non-collapsible nav object that parses YAML can now be created using a subclass. E.g.:

python
class PrimaryNav(prototypes.NavObject):
Path to YAML file representing the object
YAML_FILE = os.path.join(os.path.dirname(__file__), 'primary_nav.yml')
Used for internal methods (do not modify)
SITE_CONFIG = SiteConfig

class MobilePrimaryNav(PrimaryNav):
COLLAPSIBLE = True
MENU_LOCATOR = (By.ID, 'nav-menu')
EXPAND_BUTTON_LOCATOR = (By.ID, 'navbar-toggle')


Details

`NavObject.parse_yaml()` now only retrieves 'menu_locator', 'expand_button_locator', and (optionally) 'collapse_button_locator' if the corresponding attributes aren't explicitly set in the class. This allows code to be reused from a non-collapsible nav to create a collapsible variant

2.11.2

2.11.1

If a tuple is passed to `pageobject.utils.yaml.parse_locator_dict()`, it's immediately returned as it's assumed to already be a locator. This allows non-YAML representations of page objects to just use normal locators. (Example documentation to be added in an upcoming docs update)


Details

* Updated `pageobject.utils.yaml.parse_locator_dict()` to handle normal locators in addition to locator dictionaries

2.11.0

Added `WebDriverConfig.SCREENSHOT_FILENAME_FORMAT`, a format string used to specify the output filenames when a file is saved by `WebDriverTestCase.screenshotOnFail()`. The format string supports the following parameters:

* {date}: Replaced with the date the screenshot was taken (YYYY-MM-DD)
* {time}: Replaced with the time the screenshot was taken (HHMMSS)
* {test}: Replaced with the test method running when screenshot was taken
* {browser}: Replaced with the browser used when screenshot was taken

The format string can include '/' directory separators to save screenshots in subdirectories of the configured `SCREENSHOT_PATH`.

Additionally, added `WebDriverTestCase.takeScreenshot()`, which saves a screenshot using the related configurations in `WebDriverTestCase`.


Details

`WebDriverConfig`:

* Added `SCREENSHOT_FILENAME_FORMAT` attribute
* `new_screenshot_file()` now determines filename based on `SCREENSHOT_FILENAME_INPUT`

`WebDriverTestCase`:

* Added `takeScreenshot()`, which saves a screenshot using the path and filename configurations in `WebDriverConfig`

2.10.2

The default `wait_timeout` value for `WebDriverTestCase` assertion methods can now be configured on a per-project and per-test case basis.

(Added after writing tests for an incredibly slow site and getting tired of setting `wait_timeout` on each assertion)

Details

* `WebDriverConfig` now has an attribute `DEFAULT_ASSERTION_TIMEOUT`. This is used as the default value of assertion methods' `wait_timeout` parameter unless overridden in the test case
* `WebDriverTestCase` now has an attribute `DEFAULT_ASSERTION_TIMEOUT`. If set in a subclass, this value is used instead of `WebDriverConfig.DEFAULT_ASSERTION_TIMEOUT` as the default `wait_timeout` value
* Assertion methods now set `wait_timeout` to the appropriate default value if the keyword argument is not provided

Page 2 of 5

© 2025 Safety CLI Cybersecurity Inc. All Rights Reserved.