ExtentSparkReporter:ExtentSparkReporter中的文本换行问题(扩展报告版本4)

时间:2020-04-24 18:50:57

标签: java testng word-wrap selenium-extent-report

我在ExtentSparkReporter(testng扩展区报告版本4中遇到问题。当文本大小大于屏幕尺寸时,在扩展区报告中显示结果。文本没有换行。是否有换行可用?存在于扩展报告版本中

@BeforeTest
public static void setup() {
    String reportPath = System.getProperty("user.dir")+ "/ApkProjects/"+"abc.html";

    sparkReporter = new ExtentSparkReporter(reportPath);
    extentReport = new ExtentReports();
    extentReport.attachReporter(sparkReporter);
}
@Test
private static void main() {
    ExtentTest ex=extentReport.createTest("A");
    ex.fail(MarkupHelper.createLabel(
            "TestCase A<br /><br />   Expected : " + "Long Text 123456 Long Text 123456Long Text 123456" + "  <br />  Actual: " + "Long TextLong Text 12345Long Text 123456Long Text 123456Long Text 123456Long Text 1234566Long Text 123456Long Text 123456Long Text 123456Long Text 123456Long Text 123456 123456Long Text 123456Long Text 123456Long Text 12Long Text 123456Long Text 123456Long Text 123456Long Text 1234563456Long Text 123456Long Text 123456" +"<br /> <br /> <a style=#FFFFFF href='" + "JIRA" + "'>Click to view  JIRA bug</a>",ExtentColor.RED));
    extentReport.flush();       
}

}`

0 个答案:

没有答案
相关问题