Class ScreenshotReporter

java.lang.Object
org.shakespeareframework.reporting.FileReporter
org.shakespeareframework.selenium.ScreenshotReporter
All Implemented Interfaces:
org.shakespeareframework.reporting.QuestionReporter, org.shakespeareframework.reporting.Reporter, org.shakespeareframework.reporting.TaskReporter

@NullMarked public class ScreenshotReporter extends org.shakespeareframework.reporting.FileReporter
Reporter using the Actor's BrowseTheWeb.getWebDriver() as TakesScreenshot to take a screenshot of the currently displayed site. By default, only retries and failures are reported. If reportSuccess is set true, successes are reported as well.
  • Nested Class Summary

    Nested classes/interfaces inherited from class org.shakespeareframework.reporting.FileReporter

    org.shakespeareframework.reporting.FileReporter.ReportType
  • Constructor Summary

    Constructors
    Constructor
    Description
    ScreenshotReporter(Path reportsPath)
    Sets reportSuccess to false.
    ScreenshotReporter(Path reportsPath, boolean reportSuccess)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    failure(org.shakespeareframework.Actor actor, org.shakespeareframework.Question<?> question, Exception cause)
     
    <A> void
    failure(org.shakespeareframework.Actor actor, org.shakespeareframework.Question<A> question, A answer)
     
    void
    failure(org.shakespeareframework.Actor actor, org.shakespeareframework.Task task, Exception cause)
     
    void
    retry(org.shakespeareframework.Actor actor, org.shakespeareframework.RetryableQuestion<?> question, Exception cause)
     
    <A> void
    retry(org.shakespeareframework.Actor actor, org.shakespeareframework.RetryableQuestion<A> question, A answer)
     
    void
    retry(org.shakespeareframework.Actor actor, org.shakespeareframework.RetryableTask task, Exception cause)
     
    <A> void
    success(org.shakespeareframework.Actor actor, org.shakespeareframework.Question<A> question, A answer)
     
    void
    success(org.shakespeareframework.Actor actor, org.shakespeareframework.Task task)
     

    Methods inherited from class org.shakespeareframework.reporting.FileReporter

    writeReport

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    Methods inherited from interface org.shakespeareframework.reporting.QuestionReporter

    start

    Methods inherited from interface org.shakespeareframework.reporting.TaskReporter

    start
  • Constructor Details

    • ScreenshotReporter

      public ScreenshotReporter(Path reportsPath, boolean reportSuccess)
      Parameters:
      reportsPath - the Path of the reports directory
      reportSuccess - if true, this will report successes as well
    • ScreenshotReporter

      public ScreenshotReporter(Path reportsPath)
      Sets reportSuccess to false.
      Parameters:
      reportsPath - the Path of the reports directory
  • Method Details

    • retry

      public void retry(org.shakespeareframework.Actor actor, org.shakespeareframework.RetryableTask task, Exception cause)
    • success

      public void success(org.shakespeareframework.Actor actor, org.shakespeareframework.Task task)
    • failure

      public void failure(org.shakespeareframework.Actor actor, org.shakespeareframework.Task task, Exception cause)
    • retry

      public void retry(org.shakespeareframework.Actor actor, org.shakespeareframework.RetryableQuestion<?> question, Exception cause)
    • retry

      public <A> void retry(org.shakespeareframework.Actor actor, org.shakespeareframework.RetryableQuestion<A> question, A answer)
    • success

      public <A> void success(org.shakespeareframework.Actor actor, org.shakespeareframework.Question<A> question, A answer)
    • failure

      public void failure(org.shakespeareframework.Actor actor, org.shakespeareframework.Question<?> question, Exception cause)
    • failure

      public <A> void failure(org.shakespeareframework.Actor actor, org.shakespeareframework.Question<A> question, A answer)