We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
@pytest.hookimpl(tryfirst=True, hookwrapper=True) def pytest_runtest_makereport(item, call): # 什么时候去识别用例的执行结果呢? # 后置处理 yield:表示测试用例执行完了 outcome = yield rep = outcome.get_result() # 获取测试用例执行完成之后的结果 if rep.failed: # 判断用例执行情况:被调用并且失败 # 实现失败截图并添加到allure附件。截图方法需要使用driver对象,想办法把driver传过来 # 如果操作步骤过程中有异常,那么用例失败,在这里完成截图操作 try: img = browser.driver.get_screenshot_as_png() # 将截图展示在allure测试报告上 allure.attach(img, '失败截图', allure.attachment_type.PNG) except Exception as e: logs("截图失败", e)
The text was updated successfully, but these errors were encountered:
What would you expect as a feature from Selene to improve the situation on your side?
Sorry, something went wrong.
No branches or pull requests
The text was updated successfully, but these errors were encountered: