def test_capabilities_for_w3c(self): options = SauceOptions() options.browser_name = 'firefox' options.browser_version = '7' options.platform_name = 'macOS 10.14' options.accept_insecure_certs = True options.page_load_strategy = 'eager' options.set_window_rect = True options.unhandled_prompt_behavior = 'accept' options.strict_file_interactability = True options.timeouts = {'implicit': 1, 'pageLoad': 59, 'script': 29} options.build = "Build Name" expected_capabilities = { 'browserName': 'firefox', 'browserVersion': '7', 'platformName': 'macOS 10.14', 'acceptInsecureCerts': True, 'pageLoadStrategy': 'eager', 'setWindowRect': True, 'unhandledPromptBehavior': 'accept', 'strictFileInteractability': True, 'timeouts': { 'implicit': 1, 'pageLoad': 59, 'script': 29 }, 'sauce:options': { 'build': 'Build Name' } } assert options.to_capabilities() == expected_capabilities
def test_w3c_options(self): sauce = SauceOptions() sauce.browser_name = 'safari' sauce.platform_name = 'macOS 10.14' sauce.accept_insecure_certs = True assert sauce.browser_name == 'safari' assert sauce.accept_insecure_certs is True assert sauce.platform_name == 'macOS 10.14'
def test_capabilities_for_w3c(self): sauce = SauceOptions() sauce.browser_name = 'safari' sauce.platform_name = 'macOS 10.14' sauce.accept_insecure_certs = True capabilities = sauce.to_capabilities() assert capabilities['acceptInsecureCerts'] is True assert capabilities['browserName'] == 'safari' assert capabilities['browserVersion'] == 'latest' assert capabilities['sauce:options']['build'] is not None
def test_w3c_options(self): timeouts = {'implicit': 1, 'pageLoad': 59, 'script': 29} options = SauceOptions() options.browser_name = 'firefox' options.browser_version = '7' options.platform_name = 'macOS 10.14' options.accept_insecure_certs = True options.page_load_strategy = 'eager' options.set_window_rect = True options.unhandled_prompt_behavior = 'accept' options.strict_file_interactability = True options.timeouts = timeouts assert options.browser_name == 'firefox' assert options.browser_version == '7' assert options.platform_name == 'macOS 10.14' assert options.accept_insecure_certs is True assert options.page_load_strategy == 'eager' assert options.set_window_rect is True assert options.unhandled_prompt_behavior == 'accept' assert options.strict_file_interactability is True assert options.timeouts == timeouts