Screen capture

session.takeScreenshot()

Takes a screenshot of the top-level browsing context’s viewport.

RETURNS

Promise<Buffer>

EXAMPLES

const screenshot = await session.takeScreenshot();
// screenshot = Buffer containing PNG

SEE ALSO

element.takeScreenshot()

Takes a screenshot of the visible region encompassed by the bounding rectangle of an element

RETURNS

Promise<Buffer>

EXAMPLES

const screenshot = await session.takeScreenshot();
// screenshot = Buffer containing PNG

SEE ALSO

Last updated