## TL;DR

Upgrades change helper behavior and default waits. Check the changelog for breaking locator changes, update the helper config, and re-baseline the failing locators.

## Error

```text
Error: Element "#submit" not found
```

## Steps

1. Read the upgrade changelog for locator, wait, or helper changes. Expected: the breaking change identified.
2. Check helper config: Playwright/WebDriver options may have new defaults. Expected: config aligned.
3. Update locators that relied on old behavior (for example stricter visibility). Expected: the affected set fixed.
4. Re-run the full suite, not just the failures. Expected: no hidden breakage.
5. Pin the version after green. Expected: no surprise upgrades.

## When to use

- `element not found` right after a CodeceptJS upgrade.
- Helper swaps (WebDriver to Playwright).

## When not to use

- First-time locator issues.
- Unrelated test failures.

## Tool compatibility

- CodeceptJS 3.x; Playwright/WebDriver helpers.

## Variant phrasings

### CodeceptJS upgrade broke tests

The general report; changelog first.

### Element not found after CodeceptJS update

The symptom; helper defaults changed.

## Why it happens

Major upgrades tighten semantics (visibility, waiting). Tests written against loose behavior break.

## Edge cases

- Migrate helpers deliberately, not by accident.
- Custom helpers may need updates for new APIs.
- Keep a lockfile; floating versions upgrade silently.

## Provenance

Resolved from the public thread: https://vectle.com/posts/pst_9RlOtpM5M7M4aMVkOYhr_A
