webdriver_test_tools.config.browser module

class webdriver_test_tools.config.browser.BrowserConfig[source]

Bases: object

Configurations for which browsers to generate tests for

ENABLED_BROWSERS = {'chrome': True, 'chrome-mobile': False, 'edge': False, 'firefox': True, 'ie': False, 'safari': False}

Dictionary mapping browser names to a boolean. True enables the browser, False disables it. Defaults to Chrome and Firefox since they’re not platform specific

classmethod get_browser_classes(browser_names=None)[source]

Get a list of enabled browser classes

Parameters

browser_names – (Optional) List of browser names to get classes for

Returns

List of enabled browser test case classes

classmethod get_browser_names()[source]

Returns a list of short names for enabled browser classes

Returns

List of short names for enabled browser test case classes

class webdriver_test_tools.config.browser.BrowserStackConfig[source]

Bases: webdriver_test_tools.config.browser.BrowserConfig

Global configurations for BrowserStack testing

ENABLE = False

Set to True to enable BrowserStack testing

USERNAME = None

Account username. Projects will need to override this

ACCESS_KEY = None

Access key. Projects will need to override this

BS_CAPABILITIES = {'browserstack.video': False, 'project': None}

BrowserStack test configurations. Capabilities reference

classmethod get_command_executor()[source]

Returns the command executor URL

Returns

Command executor URL formatted with USERNAME and ACCESS_KEY

classmethod add_browserstack_capabilities(desired_capabilities)[source]

Update a desired capabilities dictionary to include items from BS_CAPABILITIES

Parameters

desired_capabilities – Desired capabilities dictionary to update

classmethod update_configurations(**capabilities)[source]

Update BrowserStack configurations at runtime

Parameters

**capabilities

Keyword arguments for BrowserStack configurations. Possible arguments include:

  • build (string) - Name for the group of tests

  • video (boolean) - True to enable video recording, False to disable it