I have this code:
# coding: utf-8 from selenium import webdriver import pytest import allure @pytest.yield_fixture(scope=\'session\') def driver(): _dr
For allure 2
from allure_commons.types import AttachmentType allure.attach(driver.get_screenshot_as_png(), name="Screenshot", attachment_type=AttachmentType.PNG)