All Plugins

Screenshot

Utilities

Capture screenshots of web pages using Playwright. Full page captures, viewport screenshots, and element targeting.

Screenshot example
Powered by Playwright

Reliable end-to-end testing and browser automation. This plugin passes your configuration directly—no abstraction layer.

Installation

npm install @teamflojo/floimg-screenshot

Quick Start

import createClient from "@teamflojo/floimg";
import screenshot from "@teamflojo/floimg-screenshot";

const floimg = createClient();
floimg.registerGenerator(screenshot());

const capture = await floimg.generate({
  generator: "screenshot",
  params: {
    url: "https://github.com",
    fullPage: true,
    viewport: { width: 1920, height: 1080 }
  }
});

await floimg.save(capture, "./github-screenshot.png");

API Reference

Parameter Type Required Description
url string Yes URL to capture
fullPage boolean No Capture full scrollable page (default: false)
viewport { width: number, height: number } No Viewport dimensions
selector string No CSS selector to capture specific element
waitFor number | string No Wait time in ms or selector to wait for

Examples

Full Page Capture

Full Page Capture

Capture entire scrollable page

                      await floimg.generate({
  generator: "screenshot",
  params: {
    url: "https://github.com",
    fullPage: true
  }
});
                    

Improve This Plugin

Found a bug? Have a feature request? Contributions are welcome!

View on GitHub