Some links on this page are affiliate links: if you buy through them we may earn a commission, at no extra cost to you.
Codeception normally keeps acceptance-test screenshots for failures. To retain screenshots from successful steps, enable CodeceptionExtensionRecorder and set delete_successful: false. If you only need the final state of a passing Cest, use its _passed hook and WebDriver’s _saveScreenshot() method.
Choose the capture you actually need
| Goal | Use | Result |
|---|---|---|
| Review the browser journey | CodeceptionExtensionRecorder |
Screenshots at acceptance-test steps, retained for passing tests when delete_successful is false; Recorder creates a slideshow. |
| Keep one artifact from the final state | Cest _passed hook plus WebDriver _saveScreenshot() |
One image written to the path you choose after a successful Cest. |
| Capture a particular element | WebDriver makeElementScreenshot() |
An element image in tests/_output/debug. |
Recorder is the built-in route for step-by-step acceptance screenshots. Its documented default is delete_successful: true, so a passing recording is removed unless you override that setting. Both approaches require a screenshot-capable suite; Recorder specifically requires WebDriver unless you configure another module that implements Codeception’s ScreenshotSaver interface.
Retain every successful step with Recorder
1. Add the extension to your configuration
Put this in codeception.yml, or in the configuration file for the acceptance suite that runs the test:
extensions:
enabled:
- CodeceptionExtensionRecorder:
delete_successful: false
The YAML indentation matters. If your project keeps suite-specific settings in a separate file, place the same extension block there so it is loaded by the acceptance run.
#1 Best Overall
- CRISP CLARITY: This 23.8″ Philips V line monitor delivers crisp Full HD 1920x1080 visuals. Enjoy movies, shows and videos with remarkable detail
- INCREDIBLE CONTRAST: The VA panel produces brighter whites and deeper blacks. You get true-to-life images and more gradients with 16.7 million colors
- THE PERFECT VIEW: The 178/178 degree extra wide viewing angle prevents the shifting of colors when viewed from an offset angle, so you always get consistent colors
- WORK SEAMLESSLY: This sleek monitor is virtually bezel-free on three sides, so the screen looks even bigger for the viewer. This minimalistic design also allows for seamless multi-monitor setups that enhance your workflow and boost productivity
- A BETTER READING EXPERIENCE: For busy office workers, EasyRead mode provides a more paper-like experience for when viewing lengthy documents
2. Confirm the suite has WebDriver
Recorder needs a browser module that can save screenshots. Check the acceptance suite configuration for an enabled WebDriver module and a working browser session. If your project uses a different screenshot provider, Recorder’s module option can point to a module implementing CodeceptionLibInterfacesScreenshotSaver.
3. Run the acceptance test
Use your normal Codeception command for the acceptance suite. Recorder captures images as the test moves through its steps. When the test passes, the images remain because successful recordings are no longer deleted.
4. Open the generated slideshow
Look under tests/_output/record_*. Recorder creates a recording directory with an index.html slideshow. Open that file locally to inspect the sequence and identify the exact step at which the UI changed.
Recommended Free Tools
Rank #2
- CRISP CLARITY: This 22 inch class (21.5″ viewable) Philips V line monitor delivers crisp Full HD 1920x1080 visuals. Enjoy movies, shows and videos with remarkable detail
- 100HZ FAST REFRESH RATE: 100Hz brings your favorite movies and video games to life. Stream, binge, and play effortlessly
- SMOOTH ACTION WITH ADAPTIVE-SYNC: Adaptive-Sync technology ensures fluid action sequences and rapid response time. Every frame will be rendered smoothly with crystal clarity and without stutter
- INCREDIBLE CONTRAST: The VA panel produces brighter whites and deeper blacks. You get true-to-life images and more gradients with 16.7 million colors
- THE PERFECT VIEW: The 178/178 degree extra wide viewing angle prevents the shifting of colors when viewed from an offset angle, so you always get consistent colors
5. Tune noisy or environment-specific runs
- Use Recorder’s
ignore_stepsoption when routine actions create more images than your reviewers need. - Use per-environment configuration when local, staging and CI runs should retain different artifacts.
- Keep the generated recording directory as a test artifact in CI if teammates need to review it after the job ends.
- Choose a retention policy for old
record_*directories; Recorder does not establish a universal naming or archival policy for your project.
Capture only the final state of a passing Cest
A Cest can define _passed. Codeception calls this hook when the Cest succeeds, allowing you to save the current browser page without producing a screenshot after every action.
<?php
class CheckoutCest
{
public function _passed(AcceptanceTester $I)
{
$this->getModule('WebDriver')->_saveScreenshot(
codecept_output_dir() . 'checkout-passed.png'
);
}
public function completesCheckout(AcceptanceTester $I)
{
$I->amOnPage('/checkout');
$I->fillField('#email', '[email protected]');
$I->click('Place order');
$I->see('Thank you');
}
}
The WebDriver module’s _saveScreenshot() method writes the current page to the path supplied. codecept_output_dir() points at Codeception’s output directory, so the example produces checkout-passed.png there. Give each Cest or test scenario a distinct filename when several tests share that directory; otherwise later runs can overwrite an earlier image.
Save an element instead of the whole page
When the useful artifact is a receipt, chart or component, WebDriver also documents makeElementScreenshot(). Those images are saved in tests/_output/debug. Use this when a full-browser image would contain irrelevant navigation or sensitive fields.
Rank #3
- Clear visuals. Fluid motion: A 144Hz refresh rate and 1ms MPRT deliver smooth, tear‑free motion across work, gaming, and streaming for clearer, more fluid viewing.
- Eye comfort: TÜV Rheinland 3‑star* certification reduces harmful blue light while preserving stunning color quality without compromise. *TÜV Rheinland 3-star eye comfort certification.
- Wide viewing angle: Get consistent views across a wide 178° /178° viewing angle.
- In-Plane Switching (IPS): See excellent color accuracy and consistency across wide viewing angles with In-plane Switching (IPS) technology.
- Ultra-thin bezels: Maximize your viewing experience with thin bezels.
Why passing screenshots disappear
Failure screenshots are the normal reporting path for acceptance tests. A successful run is treated as having no diagnostic failure, and Recorder’s delete_successful default removes its successful recordings. That behavior keeps routine output smaller, but it also means a green test has no visual trail unless you explicitly retain it or add custom capture logic.
Changing delete_successful affects Recorder output. It does not change what a custom _passed hook does: the hook writes its own image when the Cest succeeds.
Recorder or _passed: a practical decision
| Consideration | Recorder | _passed hook |
|---|---|---|
| Capture granularity | Images throughout acceptance-test steps. | One final browser state after success. |
| Review experience | Generated index.html slideshow. |
Individual files that fit existing artifact handling. |
| Configuration | One extension setting, plus an eligible screenshot module. | PHP method in each Cest or a shared base pattern. |
| Output control | Recorder directories and optional ignored steps. | Your filename and destination; avoid collisions yourself. |
| Best use | Debugging navigation, redirects and intermediate UI states. | Visual evidence of the final assertion state. |
Do not enable both automatically unless you want both artifacts. They answer different questions and can multiply the files your CI job must retain.
Rank #4
- CURVED FOR ENHANCED ENGAGEMENT: An immersive viewing experience with a curved monitor that wraps more closely around your field of vision; It creates a wider view, enhancing depth perception and minimizing peripheral distraction
- SMOOTH PERFORMANCE FOR SEAMLESS CONTENT: Stay in the action when playing games, watching videos, or working on creative projects; The 100Hz refresh rate reduces lag and motion blur so you don't miss a thing in fast-paced moments¹
- MORE GAMING POWER: Gain the edge with optimizable game settings; Color and image contrast can be adjusted to see scenes more vividly and spot enemies hiding in the dark; Game Mode adjusts any game to fill the screen so you can view every detail²
- KEEP IT EASY ON THE EYES: Care for your eyes and stay comfortable, even during long sessions; Advanced eye comfort technology certified by TÜV reduces eye strain by minimizing blue light and reducing irritating screen flicker²
- INCREASED VERSATILITY: Connect to more; Plug devices straight into your monitor for increased flexibility, making your computing environment even more convenient
Making captures reliable in local and CI runs
Wait for the state you want to prove
A screenshot records the browser’s current state, not the state you intended. Keep the final assertion after the page has finished rendering, and use the WebDriver waits already used by your test before the final capture. For Recorder, an image at an earlier step is expected; that is the point of its timeline.
Keep test output separate
Use Codeception’s output directory rather than a source directory. In CI, publish tests/_output/record_* for Recorder and the custom image path for _passed as job artifacts. Clean old artifacts according to your CI retention policy so a green build does not leave an unbounded archive.
Protect credentials and personal data
Screenshots can contain account names, order details, tokens displayed by a test page or customer data. Use test accounts, mask sensitive values in the application under test, and restrict artifact access. A screenshot retention setting is not a data-redaction feature.
Best Value
- 【INTEGRATED SPEAKERS】Whether you're at work or in the midst of an intense gaming session, our built-in speakers provide rich and seamless audio, all while keeping your desk clutter-free.
- 【EASY ON THE EYES】 Protect your eyes and enhance your comfort with Blue-Light Shift technology. This feature reduces harmful blue light emissions from your screen, helping to alleviate eye strain during long hours of use and promoting healthier viewing habits.
- 【WIDEN YOUR PERSPECTIVE】Our sleek minimal bezel design ensures undivided attention. The nearly bezel-free display seamlessly connects in a dual monitor arrangement, delivering an unobstructed view that lets you focus on more at once, completely distraction-free.
Check the installed versions
The Recorder and WebDriver pages do not identify one Codeception release version consistently. Confirm the versions installed in your project and verify the extension syntax against those installed packages before copying configuration between projects.
Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Troubleshooting passing-test captures
No screenshots remain after a green run
- Cause: Recorder is still using its default
delete_successful: true. - Fix: Set
delete_successful: falseunder the Recorder extension, check YAML indentation, and rerun the acceptance suite.
Recorder does not start
- Cause: The extension is not enabled in the configuration file used by this suite, or the suite has no compatible screenshot module.
- Fix: Move the extension block into the active suite configuration and verify WebDriver is enabled. If another provider is used, configure Recorder’s
moduleoption only when that module implementsScreenshotSaver.
The output directory is empty
- Cause: You inspected the wrong directory or ran a non-acceptance suite.
- Fix: Check
tests/_output/record_*for Recorder and confirm that the command actually loaded the acceptance suite.
The custom final image is missing
- Cause: The Cest did not finish successfully, the hook is not in the Cest class, or WebDriver is not the active module.
- Fix: Confirm the method is named exactly
_passed, retrieve the active WebDriver module, and use a writable path returned bycodecept_output_dir(). The hook is success-only, so a failed test will not create this particular image.
Images overwrite one another
- Cause: Multiple tests use the same custom filename.
- Fix: Derive unique names from the scenario or suite, or place each run in a separate artifact directory. Codeception does not impose a universal naming scheme for custom files.
The browser image shows an intermediate state
- Cause: The screenshot was taken before the asynchronous UI update completed.
- Fix: Move the capture after the assertion or an explicit wait for the expected element and state. Recorder’s intermediate images should be interpreted as a timeline, not as final-state proof.
Or skip the browser setup
If your goal is a clean image of a reachable staging or production URL rather than a Codeception-controlled browser session, ScreenshotNeo provides a single screenshot API request. It accepts consent banners before capture and removes more than 60 known consent platforms, newsletter popups and chat widgets; each cleanup step can be disabled. Only clean shots are billed: bot checks or CAPTCHAs, blank pages, timeouts, failed loads and cache hits cost nothing, and the response identifies the result with X-Page-Verdict and X-Billed headers.
Use the API only for a URL your ScreenshotNeo account and network setup can reach. It is not a replacement for assertions inside a Codeception test, but it can produce a clean visual artifact without maintaining browser-launch configuration.
Do these 3 things before closing this tab:
1Repair Windows errors before they cause bigger problems2Fix the driver behind crashes, sound loss and screen glitches3Clear out junk files and repair common Windows errorscURL
curl -G "https://api.screenshotneo.com/v1/shot" -d access_key=YOUR_API_KEY --data-urlencode url=https://your-staging.example.com -o shot.webp
Python
import requests
r = requests.get(
"https://api.screenshotneo.com/v1/shot",
params={"access_key": "YOUR_API_KEY", "url": "https://your-staging.example.com"},
timeout=90,
)
r.raise_for_status()
open("shot.webp", "wb").write(r.content)
Node.js
const q = new URLSearchParams({
access_key: 'YOUR_API_KEY',
url: 'https://your-staging.example.com'
});
const res = await fetch(`https://api.screenshotneo.com/v1/shot?${q}`);
if (!res.ok) throw new Error(`Screenshot failed: ${res.status}`);
const buffer = Buffer.from(await res.arrayBuffer());
await import('node:fs/promises').then(fs => fs.writeFile('shot.webp', buffer));
See the complete parameter reference and response behavior in the ScreenshotNeo documentation. The service supports PNG, JPEG or WebP output; full-page capture with lazy images loaded; CSS-selector element capture; dark mode; 12 device presets or a custom viewport; retina scale; PDF output with paper size, margins, landscape and page ranges; HTML/CSS-to-image; custom CSS and JavaScript; pre-capture clicks; hidden selectors; waits for a selector, delay or network idle; blocking ads, trackers, requests or resource types; custom headers, cookies, user agent and Authorization; timezone and geolocation; transparent backgrounds; resizing; a chosen cache TTL; signed links for public image tags; asynchronous jobs with signed webhooks; bulk capture of up to 100 URLs per call; a usage API; and an OpenAPI specification. Parameter names used by other screenshot APIs are accepted to ease migration.
ScreenshotNeo also provides an MCP server with take_screenshot, get_page_info and capture_pdf tools for Claude, Cursor and other MCP clients. Every feature is included on every plan. The current plans are:
| Plan | Price | Included screenshots |
|---|---|---|
| Free | $0 | 1,000 per month; no card required |
| Starter | $5 | 3,000 |
| Growth | $15 | 15,000 |
| Pro | $39 | 60,000 |
| Scale | $99 | 250,000 |
| Business | $249 | 1,000,000 |
Yearly billing provides two months free. If you want clean captures without configuring a browser, create a free ScreenshotNeo account for 1,000 screenshots a month with no card; paid plans start at $5 for 3,000.
Quick Recap
Final checklist
- For a step-by-step record, enable Recorder and set
delete_successful: false. - Confirm the acceptance suite has WebDriver or another configured
ScreenshotSavermodule. - Find Recorder’s slideshow under
tests/_output/record_*. - For one final image, add a Cest
_passedhook and call WebDriver_saveScreenshot(). - Use unique filenames, publish CI artifacts deliberately, and review screenshots for sensitive data.
Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.
Free tools Windows power users keep installed
One-click scans. No signup required.

