
Ethan Collins
Pattern Recognition Specialist

Automating browser interactions often requires handling CAPTCHA challenges, especially when working with tools like Puppeteer. In this guide, we will walk through how to set up Puppeteer JS with the CapSolver browser extension to solve reCAPTCHA v2 efficiently. While this tutorial focuses on reCAPTCHA v2, the same approach can be extended to other CAPTCHA types supported by CapSolver.
By the end of this article, you will understand how to install the required dependencies, configure the CapSolver extension, and trigger CAPTCHA solving directly within a Puppeteer-controlled browser session.
⚠️ In this blog, we will explain how to set up Puppeteer JS with the CapSolver extension to solve reCAPTCHA v2. However, this approach can be applied to other CAPTCHA types as well.
npm i puppeteer puppeteer-extra puppeteer-extra-plugin-stealth

Download the archive with the extension, and unzip it to the folder ./CapSolver.Browser.Extension in the root of the project.
The extension has many settings, including automatic CAPTCHA solving, proxy support, and fine-grained control options. These settings are available in the file ./assets/config.json.
These settings are:
{
"apiKey": "YourApiKey",
"useCapsolver": true,
"useProxy": false,
"proxyType": "http",
"hostOrIp": "",
"port": "",
"proxyLogin": "",
"proxyPassword": "",
"enabledForBlacklistControl": false,
"blackUrlList": [],
"enabledForRecaptcha": true,
"enabledForRecaptchaV3": true,
"enabledForcaptcha": true,
"reCaptchaMode": "token",
"captchaMode": "click",
"reCaptchaDelayTime": 0,
"captchaDelayTime": 0,
"reCaptchaRepeatTimes": 10,
"reCaptcha3RepeatTimes": 10,
"captchaRepeatTimes": 10
}
Enter your API key in the extension settings file ./assets/config.json. The key must be assigned to the apiKey field. You can copy your API key directly from the CapSolver dashboard.
Example:
apiKey: "CAP-4FDBD3SDFSD-23S-2-3"
In this example, reCaptchaMode is set to token. While click mode is also available, token mode is generally recommended for reCAPTCHA.
const puppeteer = require('puppeteer-extra');
const StealthPlugin = require('puppeteer-extra-plugin-stealth');
const { executablePath } = require('puppeteer');
(async () => {
const pathToExtension = require('path').join(__dirname, 'CapSolver.Browser.Extension');
puppeteer.use(StealthPlugin())
const browser = await puppeteer.launch({
headless: false,
args: [
`--disable-extensions-except=${pathToExtension}`,
`--load-extension=${pathToExtension}`,
],
executablePath: executablePath()
});
const [page] = await browser.pages()
})();
Next, open the page https://www.google.com/recaptcha/api2/demo and send the CAPTCHA to CapSolver.
Using page.goto(), navigate to the target page. The CAPTCHA can be sent for solving either automatically or manually.
In this example, we trigger it manually by waiting for the CAPTCHA checkbox and clicking it.
await page.goto('https://site.example')
// Waiting for the element with the CSS selector "#recaptcha-anchor-label"
await page.waitForSelector('#recaptcha-anchor-label')
// Click on the element
await page.click('#recaptcha-anchor-label')
const puppeteer = require('puppeteer-extra');
const StealthPlugin = require('puppeteer-extra-plugin-stealth');
const { executablePath } = require('puppeteer');
(async () => {
const pathToExtension = require('path').join(__dirname, 'CapSolver.Browser.Extension');
puppeteer.use(StealthPlugin())
const browser = await puppeteer.launch({
headless: false,
args: [
`--disable-extensions-except=${pathToExtension}`,
`--load-extension=${pathToExtension}`,
],
executablePath: executablePath()
});
const [page] = await browser.pages()
// Opening a page
await page.goto('https://site.example')
// Waiting for the element with the CSS selector "#recaptcha-anchor-label"
await page.waitForSelector('#recaptcha-anchor-label')
// Click on the element
await page.click('#recaptcha-anchor-label')
})();
You have successfully solved reCAPTCHA v2 using Puppeteer and the CapSolver browser extension. This setup provides a flexible and scalable way to handle CAPTCHA challenges directly within a real browser environment. By adjusting the extension configuration, the same workflow can be reused for other CAPTCHA types supported by CapSolver, making it suitable for testing, automation, and large-scale browser-based tasks.
1. Can this method be used in headless mode?
The CapSolver browser extension requires a visible browser environment. For this reason, headless: false is recommended when using the extension-based approach.
2. Does this setup work for CAPTCHA types other than reCAPTCHA v2?
Yes. The CapSolver extension supports multiple CAPTCHA types. You can enable or disable specific CAPTCHA solvers in the config.json file and adapt the workflow accordingly.
3. Is a proxy required when using the CapSolver extension?
A proxy is optional. The extension supports proxy configuration, but many use cases work without one. Proxy usage depends on your target website and automation requirements.
4. What is the difference between token and click modes for reCAPTCHA?
Token mode retrieves the CAPTCHA solution programmatically and is generally more stable for automation. Click mode simulates user interaction with the CAPTCHA checkbox.
5. Can this setup be used in production environments?
Yes. With proper configuration, error handling, and scaling considerations, this approach can be integrated into production-grade browser automation workflows.
Learn how to set up a browser extension for automatic CAPTCHA solving. Boost your web automation efficiency with step-by-step instructions and code examples.

Discover the best CAPTCHA solver Chrome extension in 2026. Compare top tools like CapSolver and AZcaptcha for speed, accuracy, and AI-powered bypass of reCAPTCHA and Cloudflare.
