Skip to main content

screenshot

client.browser.screenshot(data?: BrowserScreenshotRequest): Promise<BrowserActionResult>

Takes a screenshot of the current browser viewport.

Captures the visible portion of the browser page as an image. Useful for visual verification and debugging during automated testing.

Parameters

ParameterTypeRequiredDescription
dataBrowserScreenshotRequestNoOptional screenshot configuration

Returns

Promise<BrowserActionResult> — A promise that resolves to the BrowserActionResult containing the screenshot data

Example

import { CodeBoltClient } from '@codebolt/clientsdk';

const client = new CodeBoltClient();

const result = await client.browser.screenshot();
console.log(result);