Function xray::screenshot_test [−][src]
pub fn screenshot_test<S: ScreenshotIo, C: ScreenshotCaptor>(
screenshot_io: S,
screenshot_captor: C,
x: i32,
y: i32,
width: u32,
height: u32
) -> Result<(), XrayError>
Tests the rendered image against the screenshot and returns a Ok(()) if they match, and a Err(ScreenshotError) should the comparison not match or encounter an error.
The reference image is loaded using screenshot_io.load_reference()
,
while the test image is captured using screenshot_captor.capture_image(x, y, width, height)
.