public final class DebugUtils
extends java.lang.Object
FxAssert.verifyThat(Node, Matcher) or its related methods.
It is possible to create completely customized error messages by chaining functions together using
compose(Function[]) or one can use the standard provided handlers such as
informedErrorMessage(FxRobot), informedErrorMessage(FxRobot, String), etc.
All indent parameters in methods are used to specify the spacing to insert in order to
offset values. The default indent value is three spaces (e.g. " ").
When a test fails, an image of the screen at the time of failure can be captured and saved to a PNG file.
DebugUtils provides support for a number of image sizes: the full screen, a window, an area of the
screen (i.e. bounds), or an individual node. Use the convenience methods prefixed by "save" (e.g.
saveScreenshot(String)) to capture and save images. The image path will be printed using
insertContent(String, Object) and will appear in the error message. For your own custom handler, use
saveTestImage(Function, Supplier, String), one of the "capture"-prefixed methods, and a
Supplier<Path> that determines where to save the image to.
This class uses the concept of combining functions together in order to add additional information
to the error message of an AssertionError thrown by a failing test.
Example:
// Template:
compose(
// insert a header for the section of error information
insertHeader(headerText),
// insert the specific content that falls under this header
insertContent(contentHeading, content),
insertContent(contentHeading2, contentIterable),
insertContent(contentHeading3, contentArray),
insertContent(contentHeading4, contentStream),
// insert a header for the section of error information
insertHeader(headerText),
// insert the specific content that falls under this header
insertContent(contentHeading5, contentStream2),
insertContent(contentHeading6, contentStream3));
// Example:
compose(
insertHeader("Context:"),
showKeysPressedAtTestFailure(this),
showMouseButtonsPressedAtTestFailure(this),
showFiredEvents(),
saveScreenshot());
// is equivalent to:
informedErrorMessage(this);
// as it uses all of the default arguments.
| Modifier and Type | Method and Description |
|---|---|
static java.util.function.Function<CaptureSupport,javafx.scene.image.Image> |
captureBounds(javafx.geometry.Bounds bounds) |
static java.util.function.Function<CaptureSupport,javafx.scene.image.Image> |
captureBounds(javafx.geometry.Rectangle2D bounds) |
static java.util.function.Function<CaptureSupport,javafx.scene.image.Image> |
captureNode(javafx.scene.Node node) |
static java.util.function.Function<CaptureSupport,javafx.scene.image.Image> |
captureScreenshot() |
static java.util.function.Function<CaptureSupport,javafx.scene.image.Image> |
captureScreenshot(int screenIndex) |
static java.util.function.Function<CaptureSupport,javafx.scene.image.Image> |
captureScreenshot(javafx.stage.Screen screen) |
static java.util.function.Function<CaptureSupport,javafx.scene.image.Image> |
captureWindow()
Captures the registered stage.
|
static java.util.function.Function<CaptureSupport,javafx.scene.image.Image> |
captureWindow(javafx.stage.Window window) |
static java.util.function.Function<java.lang.StringBuilder,java.lang.StringBuilder> |
compose(java.util.function.Function<java.lang.StringBuilder,java.lang.StringBuilder>... functions)
Composes multiple functions together into one.
|
static java.util.function.Supplier<java.nio.file.Path> |
defaultImagePath()
Returns
defaultImagePath(String, int) with "testfx-test" as the test name and
gets and increments the next photo number. |
static java.util.function.Supplier<java.nio.file.Path> |
defaultImagePath(java.lang.String testName)
Returns
() -> Paths.get(testName + " - 0.png"); |
static java.util.function.Supplier<java.nio.file.Path> |
defaultImagePath(java.lang.String testName,
int photoNumber)
Returns
() -> Paths.get(testName + " - " photoNumber + ".png"); |
static java.util.function.Function<java.lang.StringBuilder,java.lang.StringBuilder> |
informedErrorMessage(FxRobot robot)
Convenience method for
informedErrorMessage(String, boolean, boolean, FxRobot, boolean, boolean)
with all booleans set to true and the header text set to "Context:". |
static java.util.function.Function<java.lang.StringBuilder,java.lang.StringBuilder> |
informedErrorMessage(FxRobot robot,
java.lang.String headerText)
Convenience method for
informedErrorMessage(String, boolean, boolean, FxRobot, boolean, boolean)
with all booleans set to true. |
static java.util.function.Function<java.lang.StringBuilder,java.lang.StringBuilder> |
informedErrorMessage(java.lang.String headerText,
boolean takeScreenshot,
boolean showFiredEvents,
FxRobot robot,
boolean showKeysPressed,
boolean showMouseButtonsPressed)
Convenience method for
insertHeader(String) using "Context:" as the header text and then, via
insertContent(String, Object), composes showKeysPressedAtTestFailure(FxRobot),
showMouseButtonsPressedAtTestFailure(FxRobot), and showFiredEvents() together in
their given order, depending on what the booleans are. |
static java.util.function.Function<java.lang.StringBuilder,java.lang.StringBuilder> |
insertContent(java.lang.String contentHeading,
java.lang.Iterable<?> contentIter)
Inserts the heading on a newline followed by two default indents followed by the given
contentHeading. |
static java.util.function.Function<java.lang.StringBuilder,java.lang.StringBuilder> |
insertContent(java.lang.String contentHeading,
java.lang.Iterable<?> contentIter,
java.lang.String indent)
Inserts the heading on a newline followed by two of the given
indents followed by the given
contentHeading. |
static java.util.function.Function<java.lang.StringBuilder,java.lang.StringBuilder> |
insertContent(java.lang.String contentHeading,
java.lang.Object content)
Inserts the heading on a newline followed by two default indents followed by the given
contentHeading. |
static java.util.function.Function<java.lang.StringBuilder,java.lang.StringBuilder> |
insertContent(java.lang.String contentHeading,
java.lang.Object[] contentArray)
Inserts the heading on a newline followed by two default indents followed by the given
contentHeading. |
static java.util.function.Function<java.lang.StringBuilder,java.lang.StringBuilder> |
insertContent(java.lang.String contentHeading,
java.lang.Object[] contentArray,
java.lang.String indent)
Inserts the heading on a newline followed by two of the given indents followed by the given
contentHeading. |
static java.util.function.Function<java.lang.StringBuilder,java.lang.StringBuilder> |
insertContent(java.lang.String contentHeading,
java.lang.Object content,
java.lang.String indent)
Inserts the heading on a newline followed by two of the given
indents followed by the given
contentHeading. |
static java.util.function.Function<java.lang.StringBuilder,java.lang.StringBuilder> |
insertContent(java.lang.String contentHeading,
java.util.stream.Stream<?> contentStream)
Inserts the heading on a newline followed by two default indents followed by the given
contentHeading. |
static java.util.function.Function<java.lang.StringBuilder,java.lang.StringBuilder> |
insertContent(java.lang.String contentHeading,
java.util.stream.Stream<?> contentStream,
java.lang.String indent)
Inserts the heading on a newline followed by two of the given indents followed by the given
contentHeading. |
static java.util.function.Function<java.lang.StringBuilder,java.lang.StringBuilder> |
insertHeader(java.lang.String headerText)
Inserts a header on a newline followed by the default indent; useful for specifying a section
in the error message.
|
static java.util.function.Function<java.lang.StringBuilder,java.lang.StringBuilder> |
insertHeader(java.lang.String headerText,
java.lang.String indent)
Inserts a header on a newline followed by the given
indent; useful for specifying a
section in the error message. |
static java.util.function.Function<java.lang.StringBuilder,java.lang.StringBuilder> |
runCode(java.lang.Runnable runnable)
Ignores the given
StringBuilder and just runs the given code block. |
static java.util.function.Function<java.lang.StringBuilder,java.lang.StringBuilder> |
saveBounds(javafx.geometry.Bounds bounds)
Saves the captured image based on the given bounds using
defaultImagePath()
and the DEFAULT_INDENT. |
static java.util.function.Function<java.lang.StringBuilder,java.lang.StringBuilder> |
saveBounds(javafx.geometry.Bounds bounds,
java.lang.String testName,
int photoNumber)
Saves the captured image based on the given bounds to "testName - photoNumber.png"
(e.g.
|
static java.util.function.Function<java.lang.StringBuilder,java.lang.StringBuilder> |
saveBounds(javafx.geometry.Bounds bounds,
java.util.function.Supplier<java.nio.file.Path> capturedImagePath,
java.lang.String indent)
Saves the captured image based on the given bounds to the supplied path.
|
static java.util.function.Function<java.lang.StringBuilder,java.lang.StringBuilder> |
saveBounds(javafx.geometry.Rectangle2D bounds)
Saves the captured image based on the given bounds using
defaultImagePath()
and the DEFAULT_INDENT. |
static java.util.function.Function<java.lang.StringBuilder,java.lang.StringBuilder> |
saveBounds(javafx.geometry.Rectangle2D bounds,
java.lang.String testName,
int photoNumber)
Saves the captured image based on the given bounds to "testName - photoNumber.png"
(e.g.
|
static java.util.function.Function<java.lang.StringBuilder,java.lang.StringBuilder> |
saveBounds(javafx.geometry.Rectangle2D bounds,
java.util.function.Supplier<java.nio.file.Path> capturedImagePath,
java.lang.String indent)
Saves the captured image based on the given bounds to the supplied path.
|
static java.util.function.Function<java.lang.StringBuilder,java.lang.StringBuilder> |
saveNode(javafx.scene.Node node)
Saves the captured node using
defaultImagePath() and the DEFAULT_INDENT. |
static java.util.function.Function<java.lang.StringBuilder,java.lang.StringBuilder> |
saveNode(javafx.scene.Node node,
java.lang.String testName,
int photoNumber)
Saves the captured node image to "testName - photoNumber.png" (e.g.
|
static java.util.function.Function<java.lang.StringBuilder,java.lang.StringBuilder> |
saveNode(javafx.scene.Node node,
java.util.function.Supplier<java.nio.file.Path> capturedImagePath,
java.lang.String indent)
Saves the captured node to the supplied path.
|
static java.util.function.Function<java.lang.StringBuilder,java.lang.StringBuilder> |
saveScreenshot()
Saves the captured primary screen image using
defaultImagePath() and the DEFAULT_INDENT. |
static java.util.function.Function<java.lang.StringBuilder,java.lang.StringBuilder> |
saveScreenshot(int screenIndex,
java.lang.String testName,
int photoNumber)
Saves the captured screenshot of the screen at the given index in
Screen.getScreens()}
to "testName - photoNumber.png" (e.g. |
static java.util.function.Function<java.lang.StringBuilder,java.lang.StringBuilder> |
saveScreenshot(int screenIndex,
java.util.function.Supplier<java.nio.file.Path> capturedImagePath,
java.lang.String indent)
Saves the captured screenshot of the screen at the given index in
Screen.getScreens()}
to the supplied path. |
static java.util.function.Function<java.lang.StringBuilder,java.lang.StringBuilder> |
saveScreenshot(javafx.stage.Screen screen,
java.lang.String testName,
int photoNumber)
Saves the captured screenshot of the screen to "testName - photoNumber.png" (e.g.
|
static java.util.function.Function<java.lang.StringBuilder,java.lang.StringBuilder> |
saveScreenshot(javafx.stage.Screen screen,
java.util.function.Supplier<java.nio.file.Path> capturedImagePath,
java.lang.String indent)
Saves the captured screenshot of the screen to the supplied path.
|
static java.util.function.Function<java.lang.StringBuilder,java.lang.StringBuilder> |
saveScreenshot(java.lang.String testName)
Saves the captured screenshot of the primary screen to "testName - 0.png"
(e.g.
|
static java.util.function.Function<java.lang.StringBuilder,java.lang.StringBuilder> |
saveScreenshot(java.lang.String testName,
int photoNumber)
Saves the captured screenshot of the primary screen to "testName - photoNumber.png"
(e.g.
|
static java.util.function.Function<java.lang.StringBuilder,java.lang.StringBuilder> |
saveScreenshot(java.util.function.Supplier<java.nio.file.Path> capturedImagePath,
java.lang.String indent)
Saves the captured screenshot of the primary screen to the supplied path.
|
static java.util.function.Function<java.lang.StringBuilder,java.lang.StringBuilder> |
saveTestImage(java.util.function.Function<CaptureSupport,javafx.scene.image.Image> captureImage,
java.util.function.Supplier<java.nio.file.Path> capturedImagePath,
java.lang.String indent)
Saves the captured image to the supplied path.
|
static java.util.function.Function<java.lang.StringBuilder,java.lang.StringBuilder> |
saveWindow()
Saves the captured registered stage image using
defaultImagePath() and the DEFAULT_INDENT. |
static java.util.function.Function<java.lang.StringBuilder,java.lang.StringBuilder> |
saveWindow(java.lang.String testName,
int photoNumber)
Saves the captured registered stage "testName - photoNumber.png" (e.g.
|
static java.util.function.Function<java.lang.StringBuilder,java.lang.StringBuilder> |
saveWindow(java.util.function.Supplier<java.nio.file.Path> capturedImagePath,
java.lang.String indent)
Saves the captured registered stage to the supplied path.
|
static java.util.function.Function<java.lang.StringBuilder,java.lang.StringBuilder> |
saveWindow(javafx.stage.Window window,
java.lang.String testName,
int photoNumber)
Saves the captured window to "testName - photoNumber.png" (e.g.
|
static java.util.function.Function<java.lang.StringBuilder,java.lang.StringBuilder> |
saveWindow(javafx.stage.Window window,
java.util.function.Supplier<java.nio.file.Path> capturedImagePath,
java.lang.String indent)
Saves the captured window to the supplied path.
|
static java.util.function.Function<java.lang.StringBuilder,java.lang.StringBuilder> |
showFiredEvents()
Via
insertContent(String, Object): shows all events that were fired since the start of the test. |
static java.util.function.Function<java.lang.StringBuilder,java.lang.StringBuilder> |
showFiredEvents(FiredEvents events)
Via
insertContent(String, Object): shows all events that were fired since the start of the test. |
static java.util.function.Function<java.lang.StringBuilder,java.lang.StringBuilder> |
showFiredEvents(FiredEvents events,
java.lang.String indent) |
static java.util.function.Function<java.lang.StringBuilder,java.lang.StringBuilder> |
showFiredEvents(java.util.List<javafx.event.Event> events) |
static java.util.function.Function<java.lang.StringBuilder,java.lang.StringBuilder> |
showFiredEvents(java.util.List<javafx.event.Event> events,
java.lang.String indent) |
static java.util.function.Function<java.lang.StringBuilder,java.lang.StringBuilder> |
showFiredEvents(java.lang.String indent) |
static java.util.function.Function<java.lang.StringBuilder,java.lang.StringBuilder> |
showKeysPressedAtTestFailure(FxRobot robot)
Via
insertContent(String, Object): shows the keys that were pressed when the test failed. |
static java.util.function.Function<java.lang.StringBuilder,java.lang.StringBuilder> |
showKeysPressedAtTestFailure(FxRobot robot,
java.lang.String indent) |
static java.util.function.Function<java.lang.StringBuilder,java.lang.StringBuilder> |
showMouseButtonsPressedAtTestFailure(FxRobot robot)
Via
insertContent(String, Object): shows the MouseButtons
that were pressed when the test failed. |
static java.util.function.Function<java.lang.StringBuilder,java.lang.StringBuilder> |
showMouseButtonsPressedAtTestFailure(FxRobot robot,
java.lang.String indent) |
@SafeVarargs public static java.util.function.Function<java.lang.StringBuilder,java.lang.StringBuilder> compose(java.util.function.Function<java.lang.StringBuilder,java.lang.StringBuilder>... functions)
functions[0] is run first, functions[1] is run second, etc.public static java.util.function.Function<java.lang.StringBuilder,java.lang.StringBuilder> runCode(java.lang.Runnable runnable)
StringBuilder and just runs the given code block.public static java.util.function.Function<java.lang.StringBuilder,java.lang.StringBuilder> insertHeader(java.lang.String headerText)
public static java.util.function.Function<java.lang.StringBuilder,java.lang.StringBuilder> insertHeader(java.lang.String headerText,
java.lang.String indent)
indent; useful for specifying a
section in the error message.public static java.util.function.Function<java.lang.StringBuilder,java.lang.StringBuilder> insertContent(java.lang.String contentHeading,
java.lang.Object content)
contentHeading.
Then, inserts a newline followed by three default indents followed by the content itself.public static java.util.function.Function<java.lang.StringBuilder,java.lang.StringBuilder> insertContent(java.lang.String contentHeading,
java.lang.Object content,
java.lang.String indent)
indents followed by the given
contentHeading. Then, inserts a newline followed by three of the given indents followed
by the content itself.public static java.util.function.Function<java.lang.StringBuilder,java.lang.StringBuilder> insertContent(java.lang.String contentHeading,
java.lang.Iterable<?> contentIter)
contentHeading.
Then, for each item in the given iterable, inserts a newline followed by three default indents followed by the
list item itself.public static java.util.function.Function<java.lang.StringBuilder,java.lang.StringBuilder> insertContent(java.lang.String contentHeading,
java.lang.Iterable<?> contentIter,
java.lang.String indent)
indents followed by the given
contentHeading. Then, for each item in the given iterable, inserts a newline followed by three of
the given indents followed by the list item itself.public static java.util.function.Function<java.lang.StringBuilder,java.lang.StringBuilder> insertContent(java.lang.String contentHeading,
java.lang.Object[] contentArray)
contentHeading.
Then, for each item in the given array, inserts a newline followed by three default indents followed by the
array item itself.public static java.util.function.Function<java.lang.StringBuilder,java.lang.StringBuilder> insertContent(java.lang.String contentHeading,
java.lang.Object[] contentArray,
java.lang.String indent)
contentHeading. Then, for each item in the given array, inserts a newline followed by three of the
given indents followed by the array item itself.public static java.util.function.Function<java.lang.StringBuilder,java.lang.StringBuilder> insertContent(java.lang.String contentHeading,
java.util.stream.Stream<?> contentStream)
contentHeading.
Then, for each item in the given stream, inserts a newline followed by three default indents followed by the
item itself.public static java.util.function.Function<java.lang.StringBuilder,java.lang.StringBuilder> insertContent(java.lang.String contentHeading,
java.util.stream.Stream<?> contentStream,
java.lang.String indent)
contentHeading. Then, for each item in the given stream, inserts a newline followed by three of
the given indents followed by the item itself.public static java.util.function.Function<java.lang.StringBuilder,java.lang.StringBuilder> showKeysPressedAtTestFailure(FxRobot robot)
insertContent(String, Object): shows the keys that were pressed when the test failed.public static java.util.function.Function<java.lang.StringBuilder,java.lang.StringBuilder> showKeysPressedAtTestFailure(FxRobot robot, java.lang.String indent)
public static java.util.function.Function<java.lang.StringBuilder,java.lang.StringBuilder> showMouseButtonsPressedAtTestFailure(FxRobot robot)
insertContent(String, Object): shows the MouseButtons
that were pressed when the test failed.public static java.util.function.Function<java.lang.StringBuilder,java.lang.StringBuilder> showMouseButtonsPressedAtTestFailure(FxRobot robot, java.lang.String indent)
public static java.util.function.Function<java.lang.StringBuilder,java.lang.StringBuilder> showFiredEvents()
insertContent(String, Object): shows all events that were fired since the start of the test.
Note: only events stored in FxToolkitContext.getFiredEvents() will be shown.public static java.util.function.Function<java.lang.StringBuilder,java.lang.StringBuilder> showFiredEvents(java.lang.String indent)
public static java.util.function.Function<java.lang.StringBuilder,java.lang.StringBuilder> showFiredEvents(FiredEvents events)
insertContent(String, Object): shows all events that were fired since the start of the test.public static java.util.function.Function<java.lang.StringBuilder,java.lang.StringBuilder> showFiredEvents(FiredEvents events, java.lang.String indent)
public static java.util.function.Function<java.lang.StringBuilder,java.lang.StringBuilder> showFiredEvents(java.util.List<javafx.event.Event> events)
public static java.util.function.Function<java.lang.StringBuilder,java.lang.StringBuilder> showFiredEvents(java.util.List<javafx.event.Event> events,
java.lang.String indent)
public static java.util.function.Function<CaptureSupport,javafx.scene.image.Image> captureScreenshot()
public static java.util.function.Function<CaptureSupport,javafx.scene.image.Image> captureScreenshot(int screenIndex)
public static java.util.function.Function<CaptureSupport,javafx.scene.image.Image> captureScreenshot(javafx.stage.Screen screen)
public static java.util.function.Function<CaptureSupport,javafx.scene.image.Image> captureWindow()
public static java.util.function.Function<CaptureSupport,javafx.scene.image.Image> captureWindow(javafx.stage.Window window)
public static java.util.function.Function<CaptureSupport,javafx.scene.image.Image> captureBounds(javafx.geometry.Bounds bounds)
public static java.util.function.Function<CaptureSupport,javafx.scene.image.Image> captureBounds(javafx.geometry.Rectangle2D bounds)
public static java.util.function.Function<CaptureSupport,javafx.scene.image.Image> captureNode(javafx.scene.Node node)
public static java.util.function.Supplier<java.nio.file.Path> defaultImagePath()
defaultImagePath(String, int) with "testfx-test" as the test name and
gets and increments the next photo number.public static java.util.function.Supplier<java.nio.file.Path> defaultImagePath(java.lang.String testName)
() -> Paths.get(testName + " - 0.png");public static java.util.function.Supplier<java.nio.file.Path> defaultImagePath(java.lang.String testName,
int photoNumber)
() -> Paths.get(testName + " - " photoNumber + ".png");public static java.util.function.Function<java.lang.StringBuilder,java.lang.StringBuilder> saveScreenshot()
defaultImagePath() and the DEFAULT_INDENT.public static java.util.function.Function<java.lang.StringBuilder,java.lang.StringBuilder> saveScreenshot(java.lang.String testName)
public static java.util.function.Function<java.lang.StringBuilder,java.lang.StringBuilder> saveScreenshot(java.lang.String testName,
int photoNumber)
public static java.util.function.Function<java.lang.StringBuilder,java.lang.StringBuilder> saveScreenshot(java.util.function.Supplier<java.nio.file.Path> capturedImagePath,
java.lang.String indent)
public static java.util.function.Function<java.lang.StringBuilder,java.lang.StringBuilder> saveScreenshot(javafx.stage.Screen screen,
java.lang.String testName,
int photoNumber)
public static java.util.function.Function<java.lang.StringBuilder,java.lang.StringBuilder> saveScreenshot(javafx.stage.Screen screen,
java.util.function.Supplier<java.nio.file.Path> capturedImagePath,
java.lang.String indent)
public static java.util.function.Function<java.lang.StringBuilder,java.lang.StringBuilder> saveScreenshot(int screenIndex,
java.lang.String testName,
int photoNumber)
Screen.getScreens()}
to "testName - photoNumber.png" (e.g. "button_has_label - 2.png").public static java.util.function.Function<java.lang.StringBuilder,java.lang.StringBuilder> saveScreenshot(int screenIndex,
java.util.function.Supplier<java.nio.file.Path> capturedImagePath,
java.lang.String indent)
Screen.getScreens()}
to the supplied path.public static java.util.function.Function<java.lang.StringBuilder,java.lang.StringBuilder> saveWindow()
defaultImagePath() and the DEFAULT_INDENT.public static java.util.function.Function<java.lang.StringBuilder,java.lang.StringBuilder> saveWindow(java.lang.String testName,
int photoNumber)
public static java.util.function.Function<java.lang.StringBuilder,java.lang.StringBuilder> saveWindow(java.util.function.Supplier<java.nio.file.Path> capturedImagePath,
java.lang.String indent)
public static java.util.function.Function<java.lang.StringBuilder,java.lang.StringBuilder> saveWindow(javafx.stage.Window window,
java.lang.String testName,
int photoNumber)
public static java.util.function.Function<java.lang.StringBuilder,java.lang.StringBuilder> saveWindow(javafx.stage.Window window,
java.util.function.Supplier<java.nio.file.Path> capturedImagePath,
java.lang.String indent)
public static java.util.function.Function<java.lang.StringBuilder,java.lang.StringBuilder> saveBounds(javafx.geometry.Bounds bounds)
defaultImagePath()
and the DEFAULT_INDENT.public static java.util.function.Function<java.lang.StringBuilder,java.lang.StringBuilder> saveBounds(javafx.geometry.Bounds bounds,
java.lang.String testName,
int photoNumber)
public static java.util.function.Function<java.lang.StringBuilder,java.lang.StringBuilder> saveBounds(javafx.geometry.Bounds bounds,
java.util.function.Supplier<java.nio.file.Path> capturedImagePath,
java.lang.String indent)
public static java.util.function.Function<java.lang.StringBuilder,java.lang.StringBuilder> saveBounds(javafx.geometry.Rectangle2D bounds)
defaultImagePath()
and the DEFAULT_INDENT.public static java.util.function.Function<java.lang.StringBuilder,java.lang.StringBuilder> saveBounds(javafx.geometry.Rectangle2D bounds,
java.lang.String testName,
int photoNumber)
public static java.util.function.Function<java.lang.StringBuilder,java.lang.StringBuilder> saveBounds(javafx.geometry.Rectangle2D bounds,
java.util.function.Supplier<java.nio.file.Path> capturedImagePath,
java.lang.String indent)
public static java.util.function.Function<java.lang.StringBuilder,java.lang.StringBuilder> saveNode(javafx.scene.Node node)
defaultImagePath() and the DEFAULT_INDENT.public static java.util.function.Function<java.lang.StringBuilder,java.lang.StringBuilder> saveNode(javafx.scene.Node node,
java.lang.String testName,
int photoNumber)
public static java.util.function.Function<java.lang.StringBuilder,java.lang.StringBuilder> saveNode(javafx.scene.Node node,
java.util.function.Supplier<java.nio.file.Path> capturedImagePath,
java.lang.String indent)
public static java.util.function.Function<java.lang.StringBuilder,java.lang.StringBuilder> saveTestImage(java.util.function.Function<CaptureSupport,javafx.scene.image.Image> captureImage, java.util.function.Supplier<java.nio.file.Path> capturedImagePath, java.lang.String indent)
public static java.util.function.Function<java.lang.StringBuilder,java.lang.StringBuilder> informedErrorMessage(FxRobot robot)
informedErrorMessage(String, boolean, boolean, FxRobot, boolean, boolean)
with all booleans set to true and the header text set to "Context:".public static java.util.function.Function<java.lang.StringBuilder,java.lang.StringBuilder> informedErrorMessage(FxRobot robot, java.lang.String headerText)
informedErrorMessage(String, boolean, boolean, FxRobot, boolean, boolean)
with all booleans set to true.public static java.util.function.Function<java.lang.StringBuilder,java.lang.StringBuilder> informedErrorMessage(java.lang.String headerText,
boolean takeScreenshot,
boolean showFiredEvents,
FxRobot robot,
boolean showKeysPressed,
boolean showMouseButtonsPressed)
insertHeader(String) using "Context:" as the header text and then, via
insertContent(String, Object), composes showKeysPressedAtTestFailure(FxRobot),
showMouseButtonsPressedAtTestFailure(FxRobot), and showFiredEvents() together in
their given order, depending on what the booleans are.