首页 > 解决方案 > 将浏览器版本添加到 pytest-html 报告

问题描述

我从命令行参数获取浏览器版本,但无法将其添加到报告中:(

conftest.py:

import pytest


def pytest_addoption(parser):
    parser.addoption("--browser-version")

def pytest_html_report_title(report):
    report.title = "need browser version string here"

标签: selenium-webdriverautomated-testspytestpytest-html

解决方案


推荐阅读