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 class
Screenshot.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 Screenshot
before()
boolean
equals(java.lang.Object o)
int
getDepth()
java.lang.String
getDescription()
FailureCause
getError()
java.lang.String
getErrorMessage()
java.lang.String
getFilename()
Screenshot.HtmlFormattedInfo
getHtml()
java.lang.String
getShortErrorMessage()
Returns the first line only of the error message.java.lang.Long
getTimestamp()
int
getWidth()
int
hashCode()
Screenshot
withDepth(int depth)
Screenshot
withDescription(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:
equals
in classjava.lang.Object
-
hashCode
public int hashCode()- Overrides:
hashCode
in classjava.lang.Object
-