Update tests
This commit is contained in:
15
tests/conftest.py
Normal file
15
tests/conftest.py
Normal file
@ -0,0 +1,15 @@
|
||||
"""Capture screenshots on failure."""
|
||||
import allure
|
||||
import base64
|
||||
|
||||
from allure_commons.types import AttachmentType
|
||||
|
||||
def pytest_selenium_capture_debug(item, report, extra):
|
||||
for log_type in extra:
|
||||
if log_type["name"] == "Screenshot":
|
||||
content = base64.b64decode(log_type["content"].encode("utf-8"))
|
||||
allure.attach(
|
||||
content,
|
||||
name="Screenshot on failure",
|
||||
attachment_type=AttachmentType.PNG,
|
||||
)
|
||||
Reference in New Issue
Block a user