Takes a screenshot of the top-level browsing context’s viewport.
const screenshot = await session.takeScreenshot();
// screenshot = Buffer containing PNG
Takes a screenshot of the visible region encompassed by the bounding rectangle of an element
const screenshot = await session.takeScreenshot();
// screenshot = Buffer containing PNG