replaceWindow method
Replace the captured image and associated metadata for a checkpoint with an image provided as a parameter.
Syntax
let result = await eyes.replaceWindow(
stepIndex,
screenshot,
tag,
title,
userInputs
);
let result = await eyes.replaceWindow(stepIndex, screenshot, tag, title);
let result = await eyes.replaceWindow(stepIndex, screenshot, tag);
let result = await eyes.replaceWindow(stepIndex, screenshot);
Parameters
- stepIndex
- Type:number
- The zero-based index of the step in which to replace the actual image.
- screenshot
- Type:Buffer
- The PNG bytes of the updated screenshot.
- tag
- Type:string [Optional ]
- The updated tag for the checkpoint.
- title
- Type:string [Optional ]
- The updated <title> tag for the checkpoint.
- userInputs
- Type:Trigger[] [Optional ]
- The updated userInputs for the checkpoint.
Return value
- Type: Promise<MatchResult>
- A promise which, when resolved, takes a value of true as a parameter, if the image matched. Otherwise, it will have a value of false.