Solve the real hCaptcha widget and verify its response token server-side
A genuine third-party hCaptcha widget rendered in its own iframe. Solve the checkbox, capture the response token, and let the server verify it via siteverify.
Unlike the self-hosted math/code/grid challenges, the answer here never lives in your DOM โ hCaptcha hands back an opaque token that only the vendor can validate server-side. Your automation cannot forge it; it has to drive the real widget and then read the token it produces.
This is the second vendor in the set. The pattern generalizes across providers: switch into the widget iframe, trigger the challenge, then extract the response token from the host page โ the exact same shape you used for reCAPTCHA. Only the iframe origin and the global name (window.hcaptcha vs window.grecaptcha) change.
Mode: practice โ the published TEST sitekey always passes, so the flow is fully automatable end to end.
Click the checkbox, then the token is auto-verified by the server
Loading hCaptcha SDKโฆ
Automation hints
frameLocator("iframe[src*=hcaptcha]")) before clicking #checkbox, never the top-level documenttextarea[name="h-captcha-response"] and is mirrored here on #hcaptcha-token[data-token] โ extract it instead of re-solving10000000-ffff-โฆ always passes: click the box, wait for the auto-POST, then assert #captcha-result[data-verdict=human]{ vendor: "hcaptcha", token } to /api/captcha/vendor to skip the UI entirely (200 = pass, 403 = fail)window.hcaptcha vs window.grecaptcha) differ; build one reusable "solve vendor captcha" helper