Ejemplo n.º 1
0
 def __init__(self, capabilities=None):
     capabilities = capabilities or {}
     caps = _merge_dicts(get_desired_capabilities(), capabilities)
     super(CustomDriver, self).__init__(
         desired_capabilities=caps,
         command_executor=get_selenium_url(),
     )
Ejemplo n.º 2
0
 def __init__(self, capabilities=None):
     capabilities = capabilities or {}
     caps = _merge_dicts(
         get_desired_capabilities(), capabilities)
     super(CustomDriver, self).__init__(
         desired_capabilities=caps,
         command_executor=get_selenium_url(),
     )
Ejemplo n.º 3
0
def get_desired_capabilities():
    """Return an object that specifies the desired capabilities.

    Read environment variables that specify how the Selenium test
    should be run. Return a dictionary representation of those values.

    """
    config = get_config()
    browser = config['selenium']['browser']
    desired_capabilities = getattr(webdriver.DesiredCapabilities, browser)
    desired_capabilities = _merge_dicts(desired_capabilities,
                                        config['selenium'])
    return desired_capabilities
Ejemplo n.º 4
0
def get_desired_capabilities():
    """Return an object that specifies the desired capabilities.

    Read environment variables that specify how the Selenium test
    should be run. Return a dictionary representation of those values.

    """
    config = get_config()
    browser = config['selenium']['browser']
    desired_capabilities = getattr(
        webdriver.DesiredCapabilities, browser)
    desired_capabilities = _merge_dicts(
        desired_capabilities, config['selenium'])
    return desired_capabilities