webdriver_test_tools.config.site module

class webdriver_test_tools.config.site.SiteConfig[source]

Bases: object

Basic class for SiteConfig. Since this is specific to a project, this particular class isn’t implemented, but exists to define an interface for the 2 variables that need to be declared in SiteConfig.


URL of the home page


Base URL for site pages (followed by a ‘/’)

classmethod parse_relative_url_dict(url_dict)[source]

Takes a URL dictionary and returns a full URL based on the values. Used to parse YAML URL dictionaries



A dictionary with the following keys:

  • ’path’: The path to a page, relative ot the SiteConfig attribute specified in ‘relative_to’

  • ’relative_to’: A valid attribute in the SiteConfig class to use as a base URL. If the value of that attribute does not have a trailing ‘/’, one will be added before appending the value of ‘path’


A full URL based on the values of the URL dictionary

  • ValueError – if url_dict['relative_to'] is not a valid attribute name in this class

  • KeyError – if ‘path’ or ‘relative_to’ are not keys in url_dict