<?xml version="1.0" encoding="UTF-8"?>
<response><data><post><id>94</id><slug>testing-login-flows-end-to-end-part-5-94</slug><title>Testing login flows end to end, part 5</title><excerpt>For part 5, we revisit the basics with a fresh example and a few lessons learned the hard way. A login form is a small piece of UI with a surprising number of paths through it: success, wrong…</excerpt><seriesName>Testing login flows end to end</seriesName><seriesPart>5</seriesPart><sections><item><heading>Introduction</heading><paragraphs><item>For part 5, we revisit the basics with a fresh example and a few lessons learned the hard way. 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.</item></paragraphs></item><item><heading>What to watch for</heading><paragraphs><item>Keep configuration such as base URLs, delays and selectors out of your code. Changing a delay should not require a redeploy.</item><item>Deduplicate as you go. The same item often appears on several listing pages, and a stable identifier such as a SKU or ID makes duplicates easy to spot.</item><item>Validate the data you extract. Prices without currencies, dates without time zones and empty fields are common sources of silent errors downstream.</item></paragraphs></item><item><heading>Common pitfalls</heading><paragraphs><item>Selectors are the most fragile part of any scraper. Prefer stable attributes such as data-testid or semantic structure over generated class names, which can change on every deploy.</item><item>Time zones matter more than they seem. Store timestamps in UTC and convert only when displaying them.</item><item>Dynamic pages render content after the initial HTML arrives. A browser automation tool can wait for a specific element to appear, which is far more reliable than sleeping for a fixed amount of time.</item></paragraphs></item><item><heading>Key takeaway</heading><paragraphs><item>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.</item></paragraphs></item></sections><authorId>4</authorId><authorName>Lucas Silva</authorName><authorSlug>lucas-silva</authorSlug><category>Testing</category><tags><item>json</item></tags><publishedAt>2026-07-29T00:00:00.000Z</publishedAt><wordCount>221</wordCount><readingTimeMinutes>2</readingTimeMinutes></post></data></response>
