Taiko
Documentation

Home / API Reference

screenshot

Captures a screenshot of the page. Appends timeStamp to filename if no filepath given.

Examples

await screenshot()
await screenshot({path : 'screenshot.png'})
await screenshot({fullPage:true})
await screenshot(text('Images', toRightOf('gmail')))

Parameters


selector

options

Returns

Promise which resolves to buffer with captured screenshot if {encoding:'base64'} given.