Before you start
Use the CAPTCHA setup example to start a browser withanti_captcha.enabled: true and create a page-level cdp session. The snippets below use an async Playwright or Puppeteer session after navigating to your target.
Configure a Gemini key on the account or pass it as anti_captcha.gemini_api_key when starting the session.
The press-and-hold button often sits inside a closed Shadow DOM, specifically to break standard element locators like Selenium’s
find_element. Surfsky’s solver interacts with the challenge at the browser level rather than through a locator, so this doesn’t affect the solve — but it’s why a manual DOM-based approach to this challenge tends to fail.Manual captcha solving
Wait for the challenge to appear, then send:Automatic captcha solving
Include"perimeterx" in anti_captcha.auto_captcha_types at startup. Attach solve event listeners, then start detection before navigating:
status: "started" confirms the background loop started. Observe failures and use a bounded wait for your page result. Keep the CDP session connected until the job completes.
Reducing challenges
Keep the page in the same session while solving. Avoid clicking or navigating concurrently with the hold action — the challenge reads mouse movement and hold timing during that window, and a concurrent action can interrupt that signal.Verify bypass worked
A completed hold does not prove the site has released the protected content — it confirms the challenge UI accepted the interaction, not that the site’s own risk check passed. Wait for the protected content or a successful response before treating the job as done. Check solver configuration, inspect one attempt in DevTools, and record the result or error before retrying. Stop the browser when the job ends.PerimeterX bypass FAQ
Is PerimeterX the same as HUMAN Security?
Is PerimeterX the same as HUMAN Security?
Yes. PerimeterX was rebranded as HUMAN Security; the press-and-hold challenge and the
perimeterx solver type are unchanged.Do I need a Gemini API key for PerimeterX?
Do I need a Gemini API key for PerimeterX?
Yes — configure it on the account or pass
anti_captcha.gemini_api_key when starting the session, the same as for other solvers that need it.Why does the challenge break when I click during the hold?
Why does the challenge break when I click during the hold?
The challenge is reading mouse movement and hold duration during that window. A concurrent click or navigation interrupts that signal and can fail the solve — avoid interacting with the page until it completes.
A completed hold didn't unblock the page — why?
A completed hold didn't unblock the page — why?
A successful hold confirms the challenge UI accepted the interaction, not that the site’s own risk check passed. Wait for the protected content or a successful response before assuming the job succeeded.