public class Screengrab
extends java.lang.Object
| Modifier and Type | Method and Description |
|---|---|
static ScreenshotStrategy |
getDefaultScreenshotStrategy() |
static void |
screenshot(java.lang.String screenshotName)
Capture a screenshot with the provided name using the default
ScreenshotStrategy |
static void |
screenshot(java.lang.String screenshotName,
ScreenshotStrategy strategy) |
static void |
screenshot(java.lang.String screenshotName,
ScreenshotStrategy strategy,
ScreenshotCallback callback) |
static void |
setDefaultScreenshotStrategy(ScreenshotStrategy strategy)
Set a
ScreenshotStrategy to be used by default for subsequent screenshot(String)
invocations |
public static ScreenshotStrategy getDefaultScreenshotStrategy()
ScreenshotStrategy used in screenshot(String) invocationspublic static void setDefaultScreenshotStrategy(ScreenshotStrategy strategy)
ScreenshotStrategy to be used by default for subsequent screenshot(String)
invocationsstrategy - ScreenshotStrategy to use as the defaultpublic static void screenshot(java.lang.String screenshotName)
ScreenshotStrategyscreenshotName - a descriptive name for the screenshot to help you identify its context.
It may only contain the letters a-z, A-Z, the numbers 0-9, underscores,
and hyphenspublic static void screenshot(java.lang.String screenshotName,
ScreenshotStrategy strategy)
screenshotName - a descriptive name for the screenshot to help you identify its context.
It may only contain the letters a-z, A-Z, the numbers 0-9, underscores,
and hyphensstrategy - The ScreenshotStrategy to use to capture this screenshot. Overrides
the default ScreenshotStrategy for this invocationsetDefaultScreenshotStrategy(ScreenshotStrategy)public static void screenshot(java.lang.String screenshotName,
ScreenshotStrategy strategy,
ScreenshotCallback callback)
screenshotName - a descriptive name for the screenshot to help you identify its context.
It may only contain the letters a-z, A-Z, the numbers 0-9, underscores,
and hyphensstrategy - The ScreenshotStrategy to use to capture this screenshot. Overrides
the default ScreenshotStrategy for this invocationcallback - The ScreenshotCallback to use to handle the captured screenshotsetDefaultScreenshotStrategy(ScreenshotStrategy)