How to remove “Chrome is being controlled by automated test software” ?

Let’s say you create a bot that instrument a Chrome browser with Puppeteer using the code below:

const puppeteer = require('puppeteer');

(async () => {
    const browser = await puppeteer.launch({
        executablePath: '/Applications/Google Chrome.app/Contents/MacOS/Google Chrome',
        headless: false
    });
    const page = await browser.newPage();
    await page.goto('https://deviceandbrowserinfo.com/http_headers');
    await browser.close()
})();

You may notice that Chrome adds the following warning, Chrome is being controlled by automated test software , under the URL bar (cf screenshots below).

To remove the Chrome is being controlled by automated test software warning, you need to pass the ignoreDefaultArgs: ["--enable-automation"] parameter when creating the puppeteer browser instance:

const browser = await puppeteer.launch({
      executablePath: '/Applications/Google Chrome.app/Contents/MacOS/Google Chrome',
      headless: false,
      ignoreDefaultArgs: ["--enable-automation"]
  });

This parameter removes the Chrome is being controlled by automated test software warning (cf screenshot below). However, you should note that it doesn’t make your bot undetectable.

Other recommended articles

Investigating the Puppeteer mode of Open Bullet 2 (credential stuffing tool)

Third article of a series about Open Bullet 2, a credential stuffing tool. We analyze the the Puppeteer mode to better understand how it works, its browser fingerprint, and how it can be detected.

Read more

Published on: 08-08-2024

(Unmodified) Headless Chrome instrumented with Puppeteer: How consistent is the fingerprint in 2024?

In this article, we conduct a deep dive analysis of the fingerprint of an unmodified headless Chrome instrumented with Puppeteer browser. We compare it with the fingerprint of a normal Chrome browser used by a human user to identify the main differences and see if they can be leveraged for bot detection.

Read more

Published on: 02-06-2024

How to detect (modified, headless) Chrome instrumented with Puppeteer (2024 edition)

In this article, we present 3 efficient techniques to detect bots that leverage Puppeteer with headless and non-headless Chrome. These techniques have been tested in June 2024.

Read more

Published on: 15-06-2024