public class HtmlReportBuilder extends Object
beginReport()
must be called first (and never again)endReport()
must be called lastIt provides syntax highlighting (e.g. for page sources) thanks to google-code-prettify.
Modifier and Type | Field and Description |
---|---|
protected static org.apache.log4j.Logger |
logger |
Constructor and Description |
---|
HtmlReportBuilder(PrintWriter writer) |
Modifier and Type | Method and Description |
---|---|
HtmlReportBuilder |
beginReport()
Begin the report by opening the tags html, head, body, table.
|
void |
endReport()
End the report by closing the tags table, body, html.
|
HtmlReportBuilder |
info(String key,
String value)
Print the given <key, value> pair in its own line.
|
HtmlReportBuilder |
pageSource(String pageSource)
Print the given page source with pretty syntax highlighting.
|
HtmlReportBuilder |
screenshot(String screenshotAsBase64)
Prints a table row containing an img with the screenshot embedded in base64 format.
|
HtmlReportBuilder |
title(String title)
Print the title of the report.
|
public HtmlReportBuilder(PrintWriter writer)
public HtmlReportBuilder beginReport()
public void endReport()
public HtmlReportBuilder title(String title)
title
- public HtmlReportBuilder pageSource(String pageSource)
pageSource
- public HtmlReportBuilder screenshot(String screenshotAsBase64)
screenshotAsBase64
- the screenshot as returned by
TakesScreenshot.getScreenshotAs(org.openqa.selenium.OutputType)
public HtmlReportBuilder info(String key, String value)
key
- value
- Copyright © 2015. All rights reserved.