Skip to content

Lupa API Reference / commands/locator / ElementScreenshotOptions

Interface: ElementScreenshotOptions ​

Defined in: src/commands/locator.ts:399

Options for the screenshot action on a locator.

Properties ​

omitBackground? ​

optional omitBackground?: boolean

Defined in: src/commands/locator.ts:418

Hides default white background and allows capturing screenshots with transparency.


path ​

path: string

Defined in: src/commands/locator.ts:403

The file path to save the screenshot to.


quality? ​

optional quality?: number

Defined in: src/commands/locator.ts:413

The quality of the image, between 0-100. Only for jpeg.


timeout? ​

optional timeout?: number

Defined in: src/commands/locator.ts:423

Maximum time in milliseconds. Defaults to 30000.


type? ​

optional type?: "png" | "jpeg"

Defined in: src/commands/locator.ts:408

The image format. Defaults to 'png'.