selenium-webdriver - 将浏览器版本添加到 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"
解决方案
推荐阅读
- vue.js - 如何让 vue 路由器正确地将对象推送到 URL 查询字符串,而不是“[Object Object]”?
- c# - 调用 FirebaseAdmin 加载凭据不起作用
- java - Ant Classloader 任务和 java 13
- java - Flyway Maven 插件从外部配置文件执行 GOLS
- android-studio - 为什么我的 Android Studio 3.5 缺少设置 > 编辑器 > 代码样式?
- paypal - 如何在 Paypal SDK createOrder 中设置商品详情?
- visual-studio-code - 如何确定导致崩溃的 VS Code 扩展?
- apache-spark - 在 Databricks / Spark 中的 SQL 中为变量分配动态值
- php - 跟踪用户日志的最佳方式?
- php - PHP,SQL根据下拉选择菜单从数据库中填充信息