Framing it as choosing the contract first is useful, since a browser flow and a direct request break for completely different reasons. A good rule of thumb is to check the network tab for a stable JSON endpoint before writing any UI automation, because that endpoint usually survives redesigns that would break selectors. When the browser is unavoidable, recording which fields came from which page element makes failures much faster to diagnose.