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.seeElement and I.dontSeeElement now check for element visibility by default, aligning with user perception. For checking DOM presence only, the new I.seeInDOM method is available.
    • I.click and I.fillField methods now internally use Playwright’s locator API, improving element targeting, stability, and reducing flakiness.
    • I.amOnPage now defaults to waiting for networkidle to 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 explicit I.waitFor* methods (e.g., I.waitForElement, I.waitForText), promoting clearer test logic.
    • I.grab* methods now return null instead 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.waitForResponse and I.waitForRequest for advanced network monitoring, I.attachFile for streamlined file uploads, and I.switchToNextTab/I.switchToPreviousTab for more flexible multi-tab testing scenarios.
  • Configuration Update: The structure of the configuration file has been updated; specifically, the plugins section has moved inside the config object in codecept.conf.ts or .js files.

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.