<?xml version="1.0" encoding="UTF-8"?>
<response><data><post><id>154</id><slug>testing-login-flows-end-to-end-part-8-154</slug><title>Testing login flows end to end, part 8</title><excerpt>Part 8 looks at what changes when the same technique has to run every day in production. A login form is a small piece of UI with a surprising number of paths through it: success, wrong password,…</excerpt><seriesName>Testing login flows end to end</seriesName><seriesPart>8</seriesPart><sections><item><heading>Introduction</heading><paragraphs><item>Part 8 looks at what changes when the same technique has to run every day in production. 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>Putting it into practice</heading><paragraphs><item>Treat HTTP 429 responses as a signal, not an obstacle. Read the Retry-After header, back off, and resume at a slower pace.</item><item>Pagination comes in several shapes: numbered pages, next links, offsets and opaque cursors. Each has trade-offs, and a robust scraper should detect the end of the result set rather than assuming a fixed number of pages.</item><item>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.</item></paragraphs></item><item><heading>A practical approach</heading><paragraphs><item>Read the site's terms of service before you start. Many sites welcome automated access within limits and say so explicitly; others ask you to use an API instead.</item><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></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>8</authorId><authorName>Hannah Novak</authorName><authorSlug>hannah-novak</authorSlug><category>Testing</category><tags><item>playwright</item><item>json</item><item>http</item><item>scrapy</item></tags><publishedAt>2026-04-14T00:00:00.000Z</publishedAt><wordCount>211</wordCount><readingTimeMinutes>2</readingTimeMinutes></post></data></response>
