Testim Documentation

Welcome to the Testim documentation. You'll find comprehensive guides to help you get started quickly, example code snippets, and tips for being more productive. You will also find details about advanced features that allow you to customize Testim to fit your environment or special testing conditions. Don't worry, we'll support you if you get stuck. Let's jump right in!

Guides    Changelog


Takes screenshots of parts of the viewport


This is a TDK feature

This is not supported in Testim's visual editor


Takes a screenshot of the whole screen. Returns said screenshot as a base 64 string.


Takes a screenshot of the whole page by scrolling down and taking screenshots of the different parts and stitching them together.


  • element {string | TDKStepLocator} a css selector or smart locator
// ✅ take a screenshot of the whole screen
await screenshot.viewport();
// ✅ take a screenshot of an element
await screenshot.element('.foo');
// ✅ take a screenshot of the whole page by scrolling
await screenshot.stitch();

// ❌ bad, element requires a selector
await screenshot.selector();

Full code example

'use strict';

const chai = require('chai');
const {expect} = chai;

const {go, screenshot, test, resize} = require('testim');

test("screenshot", async () => {
    await go("http://jsbin.testim.io/qib/2");

    const fullScreenImage = await screenshot.viewport();
    // fullScreenImage is a base 64 data url of the screen
    const elementImage = await screenshot.element("#element");
    const stitchedImage = await screenshot.stitch();

Updated about a year ago


Takes screenshots of parts of the viewport

Suggested Edits are limited on API Reference Pages

You can only suggest edits to Markdown body content, but not to the API spec.