CDP Extras
Introduction
In Vision, the standard Chrome DevTools Protocol is extended with its own human-like input and virtual mouse commands. They help make automation less detectable for anti-fraud systems: instead of instant, "robotic" actions, text entry and cursor movement look natural — as if performed by a real user.
Two extensions are available:
- Human Type — human-like text entry with natural delays between keystrokes.
- VirtualMouse — a virtual cursor with smooth, natural movement — just like a real user.
These commands are Vision extensions and are not available in stock Chromium or Chrome.
CDP Extras are available starting from the Base plan and higher.
Connecting
Commands are sent within a regular CDP session to an already running profile — through any automation library that supports the Chrome DevTools Protocol (Playwright, Puppeteer, etc.).
You can connect only to profiles launched via the API. The host and port for the connection are returned in the response to the profile launch request.
Connecting to the browser
How to connect to a running profile via Playwright, Puppeteer and other libraries
Human Type
The Input.typeText command types text into the currently focused editable element, imitating manual input: characters appear one by one with a random delay between keystrokes.
Parameters
Prop
Type
Example
const { chromium } = require('playwright');
(async () => {
const browser = await chromium.connectOverCDP('http://127.0.0.1:19397');
const context = browser.contexts()[0];
const page = await context.newPage();
const client = await context.newCDPSession(page);
await page.goto('https://example.com');
// Text is typed into the currently focused editable element
await client.send('Input.typeText', {
text: 'Typed with Human Type',
minDelay: 55,
maxDelay: 130,
});
await browser.close();
})();import asyncio
from playwright.async_api import async_playwright
async def main():
async with async_playwright() as p:
browser = await p.chromium.connect_over_cdp('http://127.0.0.1:19397')
context = browser.contexts[0]
page = await context.new_page()
client = await context.new_cdp_session(page)
await page.goto('https://example.com')
# Text is typed into the currently focused editable element
await client.send('Input.typeText', {
'text': 'Typed with Human Type',
'minDelay': 55,
'maxDelay': 130,
})
await browser.close()
asyncio.get_event_loop().run_until_complete(main())VirtualMouse
VirtualMouse is a real cursor inside the browser that moves as if a real person were controlling it: a smooth trajectory and natural micro-deviations. No instant teleports or perfectly straight lines that give automation away to anti-fraud systems.
Available commands:
VirtualMouse.create— creates the virtual cursor.VirtualMouse.configure— changes movement settings for later commands.VirtualMouse.move— moves the cursor tox,y.VirtualMouse.click— moves the cursor (if coordinates are provided) and performs a left click. Without coordinates, the current cursor position is used.VirtualMouse.destroy— removes the virtual cursor.
Movement parameters
Passed to VirtualMouse.create and VirtualMouse.configure.
Prop
Type
Click parameters
Passed to VirtualMouse.click.
Prop
Type
Example
const { chromium } = require('playwright');
(async () => {
const browser = await chromium.connectOverCDP('http://127.0.0.1:19397');
const context = browser.contexts()[0];
const page = await context.newPage();
const client = await context.newCDPSession(page);
await page.goto('https://example.com');
// Create the virtual cursor
await client.send('VirtualMouse.create', {
speed: 1.2,
x: 100,
y: 100,
noiseScale: 1.0,
includeReaction: true,
seed: 12345,
});
try {
await client.send('VirtualMouse.move', { x: 500, y: 240 });
await client.send('VirtualMouse.click', { duration: 40 });
} finally {
// Remove the cursor in any case
await client.send('VirtualMouse.destroy');
}
await browser.close();
})();import asyncio
from playwright.async_api import async_playwright
async def main():
async with async_playwright() as p:
browser = await p.chromium.connect_over_cdp('http://127.0.0.1:19397')
context = browser.contexts[0]
page = await context.new_page()
client = await context.new_cdp_session(page)
await page.goto('https://example.com')
# Create the virtual cursor
await client.send('VirtualMouse.create', {
'speed': 1.2,
'x': 100,
'y': 100,
'noiseScale': 1.0,
'includeReaction': True,
'seed': 12345,
})
try:
await client.send('VirtualMouse.move', {'x': 500, 'y': 240})
await client.send('VirtualMouse.click', {'duration': 40})
finally:
# Remove the cursor in any case
await client.send('VirtualMouse.destroy')
await browser.close()
asyncio.get_event_loop().run_until_complete(main())Ready-made examples
Full working examples for JavaScript and Python are collected in a separate repository.
browser-vision/cdp-extras
Examples of using Human Type and VirtualMouse from your own automation code