1. image_dir = os.path.join(RunConfig.NEW_REPORT, "image", file_name) # 图片地址
    2. RunConfig.driver.save_screenshot(image_dir)
    3. with open(image_dir, "rb") as f:
    4. file = f.read()
    5. allure.attach(file, "失败截图", allure.attachment_type.PNG) # 将图片附加到报告中