Skip to content

Releases: connordelacruz/webdriver-test-tools

3.2.0: --skip-module argument

28 Oct 18:22
Compare
Choose a tag to compare

Added --skip-module/-S argument to run and list commands, allowing entire test modules to be skipped

Details

project.cmd.common:

  • Added --skip-module/-S argument to test parent parser
  • Dictionary returned when parsing test args now includes 'skip_module_names' with modules to skip

project.test_loader:

  • load_project_tests() and get_test_modules() now take optional skip_module_names argument. Modules matching these names are filtered out before checking test_module_names

project.cmd.list:

  • list_tests() now accepts skip_module_names and passes to load_project_tests()

project.cmd.run:

  • run_tests() now accepts skip_module_names and passes to load_project_tests()

3.1.0

16 Oct 19:53
Compare
Choose a tag to compare

Hotfix for missing import in __main__

3.0.1: Command exit codes

11 Oct 21:37
Compare
Choose a tag to compare

Test project and wtt commands now set the exit code after execution. This can allow the framework to be integrated with automation tools.

Details

__main__:

  • main() now calls sys.exit(exit_code), where exit_code is 0 if command was executed without issue, or 1 if an exception occurred or no command was specified. Exceptions are printed before exiting

project.test_module:

  • main() now calls sys.exit(exit_code), where exit_code is 0 if command was executed without issue, or 1 if an exception occurred or the parse_<command>_args() function returned a non-zero exit code. Exceptions are printed before exiting

project.cmd.common:

  • Removed load_tests() as its only purpose was to wrap test_loader.load_project_test() and catch and print any exceptions, which are now propagated to test_module.main(). Functions in list and run that used this now call test_loader.load_project_test() directly

project.cmd.list:

  • parse_list_args() now returns an exit code

project.cmd.new:

  • parse_new_args() now returns an exit code and no longer catches exceptions, letting them propagate to test_module.main()

project.cmd.run:

  • parse_run_args() now returns an exit code based on the results of run_tests()
  • run_tests() now captures the results of test_runner.run() and returns 0 if all tests passed, or 1 if there were any failures

3.0.0

08 May 21:10
Compare
Choose a tag to compare

Various changes, code cleanup, and deprecation for version 3.0.

Most of the changes were related to inline docstrings and code cleanup. The actual code changes are listed below.

Details

  • Updated install_requires package versions and added upper bound version numbers
  • Updated __about__.py for 3.0.0-beta
  • Moved internal utility method validate_filename() from common.utils to common.files
  • Removed webdriver import from test case templates (it typically doesn't get used on its own, as driver initialization is handled internally)

Deprecated

webdriver.actions.form:

  • Removed inputs for filling forms/retrieving form values. These were used internally and have been replaced with methods in InputObject. Any code that called these methods directly instead of the deprecated FormObject.fill_form() wrapper should be replaced with a corresponding FormObject

pageobject.form.FormObject:

  • Removed Input nested class. This shouldn't affect any implementations that declare their own Input nested class
  • Removed fill_form(). Any usages of it should be able to be replaced with fill_inputs() without altering parameters or input_map syntax

pageobject.nav.NavObject:

  • Removed LINK_MAP and HOVER_MAP attribute declarations. This shouldn't affect any implementations that declare their own, but since they are no longer used in any methods changes will likely need to be made anyway
  • Removed click_page_link() and hover_over_page_link(). These have been replaced by click_link() and hover_over_link(), which take a key into links (a dictionary mapping name strings to InputObject instances that's populated either by the contents of YAML_FILE or LINK_DICTS) and return one of a few possible options depending on the click/hover action that's set. See the documentation for details

pageobject.nav.CollapsibleNavObject:

  • Removed CollapsibleNavObject. It should be replaced with a NavObject with COLLAPSIBLE = True. The only difference in attribute names is that MENU_CONTAINER_LOCATOR has been shortened to MENU_LOCATOR in NavObject. All collapsible-specific methods are the same name in NavObject.

config.webdriver.WebDriverConfig:

  • Removed IMPLICIT_WAIT configuration. Selenium warns that implicit and explicit waits should not be mixed (source), and the framework relies heavily on explicit waits

2.13.1: list command --verbose flag

06 May 17:09
Compare
Choose a tag to compare

<test_project> list now displays module names in addition to classes and methods. Additionally, the --verbose flag was added, which prints test docstrings and outputs using tree characters e.g.:

home:
└── HomePageTestCase:
    Really contrived example test case
    ├── test_more_information_link
    │   Test that the 'More information...' link goes to the correct URL
    └── test_page_heading
        Ensure that the page heading text is correct

Details

common.cmd:

  • Added print_shortened(), which truncates strings longer than the terminal width

project.cmd.list:

  • Added --verbose flag to list command. If used, docstrings for test cases and methods will be printed
  • list now shows modules in addition to test classes and methods
  • Re-worked internals of how list prints stuff

2.13.0: WebDriverTestCase.is_mobile()

02 May 19:36
Compare
Choose a tag to compare
  • Added WebDriverTestCase.is_mobile(), which returns True if the test is currently running in a mobile browser. This allows tests to handle things differently for mobile browsers
  • NavLinkObject now accepts None for hover/click actions, making for more pythonic code when declaring a non-YAML nav object

2.12.1: Prototype documentation update

02 May 14:52
Compare
Choose a tag to compare

No code changes, but added documentation

2.12.0: Collapsible variant of existing YAML nav objects

30 Apr 18:55
Compare
Choose a tag to compare

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

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: Fixed scrolling to link with fixed navs

30 Apr 17:25
Compare
Choose a tag to compare
fixed scrolling in fixed navs

2.11.1: Normal locator support in non-YAML page object dictionaries

29 Apr 19:15
Compare
Choose a tag to compare

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