Playwright gives you two ways to put text in a field, and neither is how a person types. fill() sets the value. pressSequentially() presses keys, with a gap you choose, which is the same gap for every key. Typing like a human means writing the timing yourself, and the timing is the part sites that score behaviour actually read.
What fill() and pressSequentially() send
Playwright's input guide says locator.fill() "focuses the element and triggers an input event with the entered text" (Playwright docs, read 2 November 2026). One event, no keys. A field that goes from empty to a full email address with no keydown in front of it is among the cheapest automation signals a page can collect, and a paste looks almost the same: one event, marked insertFromPaste, and no key presses at all.
pressSequentially() is closer. Its reference says it "sends a keydown, keypress/input, and keyup event for each character", and its delay option is the "time to wait between key presses in milliseconds", defaulting to 0 (Locator docs, read 2 November 2026). The example in the docs is { delay: 100 }, labelled "Types slower, like a user". Slower, yes. But a person typing "hello, world" does not leave 100 ms between every pair of keys.
What human typing looks like
The intervals between a person's keystrokes are right-skewed: most are quick, a few are much slower, and there is no ceiling. Some patterns are steady enough to model:
- A longer gap after a space or punctuation, where people hesitate.
- A longer gap for a shifted character, which costs an extra key.
- Now and then a pause many times the average, as if reading.
- Now and then a wrong neighbouring key, a beat while the typist notices, then Backspace and the right one.
None of this needs to be clever. It needs to not be constant.
Everything the window does, from a script on your own computerIn Mosaic: REST API. Everything the window does, from your own scripts. Free covers 3 profiles with no card, and Pro is $25 a month for any number of them.
Mosaic is a desktop app
Email yourself the link and open it on your computer.
How to type like a human in Playwright
This helper does all four with page.keyboard, one key at a time. It assumes the field is already focused.
const NEAR = { a: 'qwsz', e: 'wsdr', i: 'ujko', o: 'iklp', n: 'bhjm', s: 'awedxz', t: 'rfgy' }
const sleep = (ms) => new Promise((r) => setTimeout(r, ms))
// Right-skewed: mostly near the mean, occasionally much longer.
function gap(mean) {
const z = Math.sqrt(-2 * Math.log(1 - Math.random())) * Math.cos(2 * Math.PI * Math.random())
return mean * Math.exp(0.4 * z - 0.08)
}
export async function typeLikeAPerson(page, text, { cpm = 320, typoRate = 0.015 } = {}) {
const mean = 60000 / cpm
for (const ch of text) {
const near = NEAR[ch.toLowerCase()]
if (near && Math.random() < typoRate) {
await page.keyboard.type(near[Math.floor(Math.random() * near.length)])
await sleep(mean * (1.5 + Math.random() * 2.5)) // the beat before you notice
await page.keyboard.press('Backspace')
await sleep(mean * (0.8 + Math.random()))
}
if (ch === '\n') await page.keyboard.press('Enter')
else await page.keyboard.type(ch)
let wait = gap(mean)
if (/[\s.,!?;:]/.test(ch)) wait *= 1.6
if (ch !== ch.toLowerCase()) wait *= 1.3
if (Math.random() < 0.02) wait += mean * (8 + Math.random() * 12)
await sleep(wait)
}
}
Call it after clicking into the field: await page.getByLabel('Email').click(), then await typeLikeAPerson(page, 'name@example.com'). Pick cpm per account and keep it, because one person types at roughly one speed.
The keys still go in through the DevTools Input domain, so the page sees them as trusted. On our own engine, Input.dispatchKeyEvent left deviceandbrowserinfo's verdict at isBot=false. What did flip it to isBot=true was Runtime.enable, a command Playwright relies on, as rebrowser's write-up of the leak explains (read 2 November 2026); the Playwright guide covers what to do about that.
Check it on a page you control
Measure your typing before a site does. Open a local page with one input, record when each keydown arrives, and print the gaps after the script runs:
await page.setContent('<input id="f">')
await page.evaluate(() => {
window.gaps = []
let last = 0
document.getElementById('f').addEventListener('keydown', (e) => {
const now = performance.now()
if (last) window.gaps.push(Math.round(now - last))
last = now
})
})
await page.click('#f')
await typeLikeAPerson(page, 'Meet me at 10, near the station.')
console.log(await page.evaluate(() => window.gaps))
Run it against pressSequentially('…', { delay: 100 }) as well. That list comes back as a column of near-identical numbers. The helper's list should wander: a run of quick gaps, a slow one after the comma, a long one somewhere for no reason, and two extra entries where a typo went in and came out. If yours has no long tail, raise the spread in gap().
Do this on a page of your own, in a throwaway browser. page.evaluate runs script in the page's own world, which a site could notice, and it has no place in the profile you are protecting.
The same thing without writing it, in Mosaic
Mosaic's typing is the model above, built in. Its routes on the local REST API need a running profile and an API key.
POST /profiles/:id/page/typetypes into a field byreforselector, clicking it first with a pointer that travels there. With"clear": trueit selects the existing value with a triple click, so the new text replaces it.POST /profiles/:id/typetypes into whatever has focus. Its options arecharactersPerMinute(default 320),typoRate(default 0.015, up to 0.1) andthinkingPauses(default on).POST /running/typetypes the same text into many running profiles at once, and each window draws its own timing. Forty sessions typing one password at identical intervals would be a pattern of their own.

You can mix the two: drive navigation with Playwright and call the typing route for the field that matters, because Chrome accepts more than one DevTools client at a time (connecting to Chrome over CDP has the source). The guide to automating several profiles shows where typing fits in a batch run. The REST API is part of Pro, $25 a month, charged at checkout, on the pricing page.
Sources
- Playwright docs: Input (text input), read November 2, 2026
- Playwright docs: Locator.pressSequentially, read November 2, 2026
- rebrowser-patches: Runtime.Enable leak (GitHub), read November 2, 2026






