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.
  • 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

      public FailureCause 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

      public Screenshot.HtmlFormattedInfo getHtml()
    • withDescription

      public Screenshot withDescription​(java.lang.String description)
    • withDepth

      public Screenshot withDepth​(int depth)
    • before

      public Screenshot before()
    • equals

      public boolean equals​(java.lang.Object o)
      Overrides:
      equals in class java.lang.Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class java.lang.Object