我使用Bahave
,并且在environment.py
中有一个after_scenario
的下一个条件
def after_scenario(context, scenario):
if scenario.status == "failed":
time_now = datetime.now().strftime("%Y-%m-%d_%H-%M-%S")
context.browser.save_screenshot("failed_scenarios_screenshots/%s_%s_failed.png" % (scenario.name, time_now))
如何将制作的屏幕截图添加到json或html报表中?在
目前没有回答
相关问题 更多 >
编程相关推荐