CodeceptJS 4.0.0, released on 2026-05-21, marks a significant major update for the test automation framework. This version focuses on modernization and improved developer experience, building on its foundation for end-to-end testing. For full details, refer to the official CodeceptJS 4.0.0 blog post.
Key Changes
- TypeScript Rewrite: The entire framework is now written in TypeScript. This provides enhanced type safety, better IDE auto-completion, and easier maintenance for contributors, making test script development more robust and less error-prone.
- Playwright as Default: Playwright is now the recommended and default browser helper, offering modern browser automation capabilities and improved performance. The WebDriver helper remains supported for existing projects, but the WebDriverIO helper has been removed entirely. Users currently relying on WebDriverIO must plan for migration to either Playwright or WebDriver.
- API Enhancements & Deprecations:
I.seeElementandI.dontSeeElementnow check for element visibility by default, aligning with user perception. For checking DOM presence only, the newI.seeInDOMmethod is available.I.clickandI.fillFieldmethods now internally use Playwright’slocatorAPI, improving element targeting, stability, and reducing flakiness.I.amOnPagenow defaults to waiting fornetworkidleto ensure all page resources are loaded before proceeding, preventing common timing issues.- Older
I.wait*methods (e.g.,I.wait,I.waitForVisible) are deprecated in favor of more explicitI.waitFor*methods (e.g.,I.waitForElement,I.waitForText), promoting clearer test logic. I.grab*methods now returnnullinstead of throwing an error if an element is not found, allowing for more graceful error handling and conditional logic in tests.
- New Capabilities: This release introduces
I.waitForResponseandI.waitForRequestfor advanced network monitoring,I.attachFilefor streamlined file uploads, andI.switchToNextTab/I.switchToPreviousTabfor more flexible multi-tab testing scenarios. - Configuration Update: The structure of the configuration file has been updated; specifically, the
pluginssection has moved inside theconfigobject incodecept.conf.tsor.jsfiles.
Impact for QA Teams
This update provides QA teams with a more stable and type-safe framework, especially beneficial for larger, complex projects. The shift to Playwright as default aligns with modern browser automation trends, potentially improving test execution speed and reliability. Teams currently using WebDriverIO will need to allocate resources for migrating their existing tests to Playwright or WebDriver.
