Class Screenshot
java.lang.Object
net.thucydides.core.model.screenshots.Screenshot
public class Screenshot
extends java.lang.Object
Represents a screenshot stored during a test execution.
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classScreenshot.HtmlFormattedInfo -
Constructor Summary
Constructors Constructor Description Screenshot(java.lang.String filename, java.lang.String description, int width, long timestamp)Screenshot(java.lang.String filename, java.lang.String description, int width, long timestamp, FailureCause error)Screenshot(java.lang.String filename, java.lang.String description, int width, long timestamp, FailureCause error, int depth) -
Method Summary
Modifier and Type Method Description Screenshotbefore()booleanequals(java.lang.Object o)intgetDepth()java.lang.StringgetDescription()FailureCausegetError()java.lang.StringgetErrorMessage()java.lang.StringgetFilename()Screenshot.HtmlFormattedInfogetHtml()java.lang.StringgetShortErrorMessage()Returns the first line only of the error message.java.lang.LonggetTimestamp()intgetWidth()inthashCode()ScreenshotwithDepth(int depth)ScreenshotwithDescription(java.lang.String description)Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
-
Constructor Details
-
Screenshot
public Screenshot(java.lang.String filename, java.lang.String description, int width, long timestamp, FailureCause error) -
Screenshot
public Screenshot(java.lang.String filename, java.lang.String description, int width, long timestamp, FailureCause error, int depth) -
Screenshot
public Screenshot(java.lang.String filename, java.lang.String description, int width, long timestamp)
-
-
Method Details
-
getError
-
getErrorMessage
public java.lang.String getErrorMessage() -
getShortErrorMessage
public java.lang.String getShortErrorMessage()Returns the first line only of the error message. This avoids polluting the UI with unnecessary details such as browser versions and so forth. -
getFilename
public java.lang.String getFilename() -
getDescription
public java.lang.String getDescription() -
getWidth
public int getWidth() -
getTimestamp
public java.lang.Long getTimestamp() -
getDepth
public int getDepth() -
getHtml
-
withDescription
-
withDepth
-
before
-
equals
public boolean equals(java.lang.Object o)- Overrides:
equalsin classjava.lang.Object
-
hashCode
public int hashCode()- Overrides:
hashCodein classjava.lang.Object
-