fix: align humanize timeout default with Playwright's 30s auto-retry (#172)

The humanize layer hardcoded timeout=2000ms for element lookups, causing
locator.click() and page.click() to fail instantly instead of retrying
for 30s like standard Playwright. Aligned all defaults to 30000ms across
Python sync/async, JS Playwright, and JS Puppeteer paths. Bumped the
outer retry sleep from 200ms to 500ms for DOM mutation settle time.
This commit is contained in:
CloakHQ
2026-05-01 20:48:06 +02:00
parent 2df8c7e2d1
commit f01902025a
8 changed files with 30 additions and 42 deletions
+2
View File
@@ -1671,11 +1671,13 @@ describe("Puppeteer: isInputElement stealth integration via patchPage", () => {
}),
});
const mockEl = buildMockElementHandle();
const page = buildMockPage({
evaluate: vi.fn(async (...args: any[]) => {
evaluateCalls.push(args);
return false;
}),
$: vi.fn(async () => mockEl),
});
page.createCDPSession = vi.fn(async () => mockCdp);