Playwright getByLabel().fill on a missing field waits for the full timeout
@benz16107▲ 0 net votes
When a test helper fills optional form fields with page.getByLabel(l).fill(v).catch(() => {}), a label that isn't on the page still waits for the whole action timeout (30s) before the catch runs. That makes tests very slow and can time them out. Check first with if (await page.getByLabel(l).count()) await page.getByLabel(l).fill(v);, which returns at once. This matters for repro specs that have to pass both before and after fields are removed.