Files
fleet/tools/screencap
Lucas Manuel Rodriguez 703dcf0b4f Update go to 1.26.5 (#48993)
Resolves #48988.

I ran `make update-go version=1.26.5`.

- [X] Changes file added for user-visible changes in `changes/`,
`orbit/changes/` or `ee/fleetd-chrome/changes`.

## Testing

- [X] QA'd all new/changed functionality manually

Fleet:
<img width="301" height="102" alt="Screenshot 2026-07-09 at 8 41 49 AM"
src="https://github.com/user-attachments/assets/baf76ce7-6192-4506-a9db-52f5318939ee"
/>
fleetctl:
```
fleetctl --version
fleetctl - version orbit-v1.57.0-402-ge3d0c005dc
  branch:       48988-update-go-1.26.5
  revision:     e3d0c005dc6698c024ad47a124c99e4f264855a0
  build date:   2026-07-09
  build user:   lucas
  go version:   go1.26.5
```
Also verified orbit in Linux:
<img width="582" height="121" alt="Screenshot 2026-07-09 at 8 51 55 AM"
src="https://github.com/user-attachments/assets/65672676-8010-45a1-8c28-9f9959e72134"
/>


## fleetd/orbit/Fleet Desktop

- [X] Verified compatibility with the latest released version of Fleet
(see [Must
rule](https://github.com/fleetdm/fleet/blob/main/docs/Contributing/workflows/fleetd-development-and-release-strategy.md))
- [X] Verified auto-update works from the released version of component
to the new version (see [tools/tuf/test](../tools/tuf/test/README.md))

<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit

* **Chores**
  * Updated the project and all included tooling modules to Go 1.26.5.
* Refreshed build images used by desktop Linux, load testing, and
related utilities to the newer Go toolchain.
  * Updated change log entries to reflect the Go version bump.

* **Bug Fixes**
* Improved the automation that refreshes Go-pinned Docker image
references to resolve and apply correct digests, helping prevent broken
build images.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2026-07-09 11:20:45 -03:00
..
2026-07-09 11:20:45 -03:00

screencap

A CLI tool that automatically captures screenshots of Fleet UI pages using a headless Chrome browser. It supports a built-in workflow that covers all major pages and modals, as well as custom recorded workflows that can be saved and replayed.

Prerequisites

  • Go (1.25+)
  • Google Chrome installed (the tool uses Chrome via the Chrome DevTools Protocol)
  • A running Fleet instance to capture

Building

cd tools/screencap
make build

This produces a screencap binary in the current directory.

To remove the binary:

make clean

Authentication

The tool persists a Chrome profile at ~/.fleet/screencap-profile/, so sessions survive across runs. On the first run (or when your session expires), authenticate using one of these methods:

Flag Description
-sso Opens a visible browser for SSO login. Complete the flow, then press ENTER.
-email / -password Logs in with email and password.
-cookie / -cookie-name Sets a session cookie directly (cookie name defaults to Fleet-Session).
-login Re-authenticate interactively (opens a visible browser).
(no auth flag) Reuses the saved session from a previous run.

Usage

Run the built-in full workflow

Captures all major Fleet pages (dashboard, hosts, queries, policies, software, controls, settings, account) including modals and tabs:

./screencap https://fleet.example.com

Or with authentication:

./screencap -sso https://fleet.example.com
./screencap -email admin@example.com -password secret https://fleet.example.com

Run a saved workflow

./screencap -workflow my-flow https://fleet.example.com

Record a custom workflow

Opens a visible browser where you click through the pages you want to capture. Clicks, radio buttons, checkboxes, tabs, and tooltip hovers are recorded automatically.

./screencap -record my-flow https://fleet.example.com

During recording:

  • Browse around in the browser window
  • Press ENTER to save a screenshot step (optionally type a name first)
  • Type done to finish and save the workflow

Workflow files are saved as JSON in the workflows/ directory and can be committed to the repo.

List saved workflows

./screencap -list

Additional flags

Flag Default Description
-wait-time-seconds 6 Seconds to wait for each page to load before capturing.
-workflows-dir (repo tools/screencap/workflows/) Override the directory used to read/write workflows.
-insecure false Ignore TLS certificate errors (use only for self-signed/dev certs).

Output

Screenshots are saved to screenshots/<timestamp>-<workflow>-<host>/ as numbered PNG files. Each page produces one or more images (one per viewport height if the page scrolls), and modals/tabs get their own files.

Example output structure:

screenshots/2026-03-11_113840-full-fleet.example.com/
  dashboard-1.png
  dashboard-modal-add-hosts-1.png
  dashboard-modal-add-hosts-macos-1.png
  hosts-manage-1.png
  hosts-manage-2.png
  ...