Skip to main content

Back to all FAQs

How to update automated tests after a UI change?

Confirm whether the product behavior changed on purpose or only the layout and labels did. Update assertions to match the new expected behavior first; do not “fix” tests to pass a bug. For UI-only changes, refresh selectors and waits on the affected steps only. Prefer stable locators (roles, labels, test IDs agreed with engineering) over brittle CSS paths. Re-record or edit just the broken segment instead of rebuilding entire flows when possible. Re-run the updated test locally, then in CI, and check neighboring cases that share the same page or components. Add a quick manual check if many tests broke at once - that often signals a shared selector or a global layout shift worth fixing once in a shared helper or page object.

More testing & automation FAQs