def test_function_Chrome(browser_Chrome): try: print() test_name = "Checking multiple windows operationing" test_start_time = time.time() common.startTest(test_name) overall_result = True overall_result = check_multi_windows(browser_Chrome) and overall_result except Exception as e: overall_result = False common.finish(False, "Exception detected (%s)" % e.__str__()) raise e finally: common.finishTest(test_name, overall_result, test_start_time)
def test_function_Chrome(browser_Chrome): try: print() test_name = "User registration" test_start_time = time.time() common.startTest(test_name) overall_result = True overall_result = register_user(browser_Chrome) and overall_result except Exception as e: overall_result = False common.finish("Exception detected") raise e finally: common.finishTest(test_name, overall_result, test_start_time)
def test_function_Chrome(browser_Chrome): try: print() test_name = "Add new goods" test_start_time = time.time() common.startTest(test_name) overall_result = True overall_result = add_new_goods(browser_Chrome) and overall_result except Exception as e: overall_result = False common.finish(False, "Exception detected") raise e finally: common.finishTest(test_name, overall_result, test_start_time)
def test_function_Chrome(browser_Chrome): try: print() test_name = "Processing Shopping Cart" test_start_time = time.time() common.startTest(test_name) overall_result = True overall_result = process_shopping_cart( browser_Chrome) and overall_result except Exception as e: overall_result = False common.finish(False, "Exception detected (%s)" % e.__str__()) raise e finally: common.finishTest(test_name, overall_result, test_start_time)
def test_function_Chrome(browser_Chrome): try: print() test_name = "Browser log access check" test_start_time = time.time() common.startTest(test_name) overall_result = True overall_result = browse_catalog(browser_Chrome) and overall_result except Exception as e: overall_result = False common.finish(False, "Exception detected") raise e finally: common.finishTest(test_name, overall_result, test_start_time) #попробуйте взять Chrome и увеличить уровень логирования до максимального #DesiredCapabilities cap = DesiredCapabilities.chrome(); #LoggingPreferences logPrefs = new LoggingPreferences(); #logPrefs.enable(LogType.BROWSER, Level.ALL); #cap.setCapability(CapabilityType.LOGGING_PREFS, logPrefs);