【问题标题】:How to set chart location in Extent Reports version 4?如何在 Extent Reports 版本 4 中设置图表位置?
【发布时间】:2023-03-30 02:41:01
【问题描述】:

我正在尝试在新版本的范围报告中设置图表位置。

我无法再导入:

import com.aventstack.extentreports.reporter.configuration.ChartLocation;

那个库已经不存在了。这当然使这行代码毫无用处:

htmlReporter.config().setTestViewChartLocation(ChartLocation.BOTTOM);

我一直在努力寻找更好的 Extent 文档,但找不到版本 3 以外的任何内容。有人知道如何设置图表位置吗?

【问题讨论】:

    标签: extentreports


    【解决方案1】:

    我遇到了同样的问题,经过广泛搜索后我发现了这个 - http://extentreports.com/docs/versions/4/java/breaking-changes.html

    只需从配置中删除 ChartLocation 即可。

    【讨论】:

    • 似乎OP想要设置图表的位置(找到ChartLocation的等价物),而不仅仅是摆脱错误消息......
    • ChatLocation 的默认配置位于 - C:\Users\\.m2\repository\com\aventstack\extentreports\4.0.9\extentreports-4.0.9.jar!\ html.properties C:\Users\\.m2\repository\com\aventstack\extentreports\4.0.9\extentreports-4.0.9.jar!\spark.properties 您可以在启动时覆盖属性文件(start( )) 范围报告。例如:- chartLocation=top to chartLocation=bottom 希望这有帮助
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2014-06-06
    • 2014-04-23
    • 2014-05-08
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多