replaceWindow method

Class: EyesPlatform: Selenium 4Language: JavaScript SDK:

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&lt;<a class ='link' href='/Content/api/eyes-sdk/index-gen/class-matchresult-selenium4-javascript.htm'>MatchResult</a>&gt;