This is part 10 of our series, and this time we focus on edge cases readers asked about. A login form is a small piece of UI with a surprising number of paths through it: success, wrong password, locked account, slow responses and expired forms.
Step by step
Write small, focused tests for your parsers using saved HTML fixtures. They run in milliseconds and catch layout changes long before a full crawl would.
Store raw responses alongside parsed output while you are developing. When a parser breaks, you can replay the saved HTML instead of hitting the site again.
Be careful with relative URLs. Resolve every link against the page it came from, not against the site root, or you will request pages that do not exist.
Going further
Character encodings still cause trouble. Decode responses using the charset the server declares, and normalise text before comparing or storing it.
Before writing a single line of code, look at how the page actually loads its data. Open the network panel, reload, and note which requests return the content you care about. Very often the data you want arrives as JSON from an endpoint you can call directly.
Time zones matter more than they seem. Store timestamps in UTC and convert only when displaying them.
Key takeaway
Cover each account state with its own test, assert on visible messages and on the resulting URL, and give slow paths an explicit, generous timeout.