Skip to main content

Interface: Screenshotter

mugshot.Screenshotter

Implemented by#

Methods#

takeScreenshot#

takeScreenshot(options?: ScreenshotOptions): Promise<Buffer>

Take a viewport screenshot.

Parameters:#

NameType
options?ScreenshotOptions

Returns: Promise<Buffer>

Defined in: packages/mugshot/src/interfaces/screenshotter.ts:40

takeScreenshot(selector: MugshotSelector, options?: ScreenshotOptions): Promise<Buffer>

Take a screenshot of a single element.

Will throw TooManyElementsError if selector matches more than one element.

Parameters:#

NameType
selectorMugshotSelector
options?ScreenshotOptions

Returns: Promise<Buffer>

Defined in: packages/mugshot/src/interfaces/screenshotter.ts:47