Interface ScreenshotHandler

All Known Implementing Classes:
Runner

public interface ScreenshotHandler
Handle screenshot.
  • Method Details

    • isIgnoredScreenshotCommand

      boolean isIgnoredScreenshotCommand()
      Get ignore screenshot command flag.
      Returns:
      flag to ignore "captureEntirePageScreenshot"
    • takeEntirePageScreenshot

      String takeEntirePageScreenshot​(String filename) throws UnsupportedOperationException
      Take entire page screenshot to filename. (override directory if --screenshot-dir option specified)
      Parameters:
      filename - filename.
      Returns:
      screenshot image path.
      Throws:
      UnsupportedOperationException - WebDriver does not supoort capturing screenshot.
    • takeScreenshot

      String takeScreenshot​(String filename) throws UnsupportedOperationException
      Take screenshot to filename. (override directory if --screenshot-dir option specified)
      Parameters:
      filename - filename.
      Returns:
      screenshot image path.
      Throws:
      UnsupportedOperationException - WebDriver does not supoort capturing screenshot.
    • takeScreenshotAll

      String takeScreenshotAll​(String prefix, int index)
      Take screenshot at all commands if --screenshot-all option specified.
      Parameters:
      prefix - prefix name.
      index - command index.
      Returns:
      screenshot image path.
    • takeScreenshotOnFail

      String takeScreenshotOnFail​(String prefix, int index)
      Take screenshot on fail commands if --screenshot-on-fail option specified.
      Parameters:
      prefix - prefix name.
      index - command index.
      Returns:
      screenshot image path.