ScreenshotAnalyzer#
A screenshot of the current window contents which can be analyzed in tests.
| Header: | #include <AUI/Test/UI/ScreenshotAnalyzer.h> |
| CMake: | aui_link(my_target PUBLIC aui::uitests) |
Detailed Description#
Most of the time, you don't need this class directly; averageColor and pixelColorAt assertions use it. Use it when
you need something custom:
auto screenshot = ScreenshotAnalyzer::makeScreenshot().clip(By::name("#preview").one());
EXPECT_EQ(screenshot.image().size(), glm::uvec2(64, 64));
Public Methods#
makeScreenshot#
Takes a screenshot of the current window.
Examples: