Microsoft Webwright vs Browser Use vs Human Browser

What Microsoft Webwright Actually Is
Microsoft Webwright is a research project from Microsoft that turns browser automation into a code-generation problem. Instead of choosing from a fixed set of high-level actions (click, type, wait_for, etc.), the LLM writes raw Playwright Python code on every step.
The repo is on github.com/microsoft/Webwright and, as of 2026, it has a few thousand stars and a fast-moving community kicking the tires. It’s not a product; it’s a research-grade toolkit that explores a different way to do browser agents: “code-as-action.”
Why Webwright Exists: The Element Instability Problem
Classic browser agents using structured actions usually bind to DOM elements via IDs like backend_node_id or other internal handles exposed by Chrome DevTools. These IDs are unstable:
- Every SPA re-render can rebuild the DOM and invalidate node IDs.
- Pagination, lazy-loading, A/B tests, and cookie banners all reshuffle nodes.
- Recording tools that rely on fixed indices break when UX teams ship small layout changes.
Webwright sidesteps that. Instead of saying “click element 42,” the LLM writes Playwright selectors using the same strategies humans do:
- Semantic text selectors (
page.get_by_text("Add to cart")). - CSS/XPath built from attributes and structure.
- Recovery logic (try an alternative selector when the first fails).
Because the agent is literally writing code per step, it can adapt to markup changes at runtime. That’s the core innovation: let the model do what developers do when the DOM changes instead of freezing behaviour into a brittle set of pre-defined actions and opaque node IDs.
Webwright in the Browser-Agent Landscape
Webwright doesn’t live in a vacuum. It sits next to two other patterns that engineers are using in 2026:
- Browser Use (github.com/browser-use/browser-use): a library that exposes a structured action set to LLMs instead of arbitrary code.
- Human Browser: a managed cloud browser agent platform that runs stealth-hardened Playwright at scale with multi-tab, CAPTCHA solving, and human-in-the-loop (HITL) support.
If you’re not fully up to speed on browser agents in general, the high-level patterns are covered in more detail in this deep dive on AI-agent browser automation.

Microsoft built Webwright for the AzureML demo. Production is a different sport.
Architecture: Webwright vs Browser Use vs Human Browser
All three systems automate a real Chromium instance. The difference is:
- What the LLM is allowed to emit.
- Where the browser actually runs.
- How much reliability/stealth infrastructure you get out of the box.
| Aspect | Microsoft Webwright | Browser Use | Human Browser |
|---|---|---|---|
| Action model | LLM writes Playwright Python code per step (code-as-action). | LLM chooses from a predefined structured action set. | LLM / API tasks mapped to internal actions on managed browsers. |
| Execution environment | Your infra; runs vanilla Playwright locally or in your cloud. | Your infra; typical local or server Playwright/Chrome setup. | Remote managed cloud; you hit an API (A2A endpoint). |
| Stealth / anti-bot | No built-in stealth; standard Playwright fingerprint. | Some community patterns; still standard browser fingerprint. | Stealth-hardened Playwright + residential proxies across 75 countries. |
| CAPTCHA | No solving; you handle it manually or give up. | No native solving; you integrate a solver. | Built-in solving at $0.005 per CAPTCHA. |
| Multi-session orchestration | You write your own job queue & process manager. | You build orchestration on top of the lib. | First-class multi-tab, multi-session orchestration via API. |
| Best fit | Research, internal tools, agent pattern exploration. | LLM-driven automations needing predictable structured output. | Production workloads that must survive real-world defenses. |
Microsoft Webwright Architecture
Webwright is essentially a loop:
- Navigate page.
- Summarize state + relevant DOM snippets.
- Feed that into an LLM prompt.
- LLM returns a chunk of Python code using the Playwright API.
- Execute the code in a sandbox, capture outcome.
- Repeat until the task is done or an error occurs.
Critical details:
- The LLM has to respect a sandboxed API surface (you don’t want
os.remove("/")popping up). - Webwright tracks state so the LLM “remembers” what it tried and what failed.
- Error traces and DOM snapshots can be fed back into the next prompt for recovery.
You’re getting something close to an AI pair-programmer that writes incremental Playwright scripts rather than a bot picking from a finite menu.
Browser Use Architecture
Browser Use takes the “action schema” route. The model never writes arbitrary code, it chooses actions:
click(selector=...)type(selector=..., text=...)wait_for_navigation()extract_text(selector=...)
Pros:
- Much easier to validate and log. You know every action ahead of time.
- Safer by default: no arbitrary Python execution.
- Works nicely with tools that expect JSON-like “plans” instead of code.
Cons:
- Limited expressiveness; fancy logic becomes awkward.
- When DOMs are messy, selectors designed into the action set might not be enough.
- Upgrading capabilities means changing the library’s action schema, not just prompting.
Human Browser Architecture
Human Browser exposes an API that runs headless browsers for you. Under the hood:
- Hardened Playwright clusters run in multiple regions.
- Stealth tweaks and fingerprint management try to look more like a real user.
- Residential proxies are integrated to rotate IPs across 75 countries.
- CAPTCHA solving pipelines and optional human-in-the-loop are wired in.
You don’t ship Chrome or Playwright yourself. You hit the API, pass a task description or structured steps, and Human Browser executes it remotely. Pricing is pay-as-you-go: $0.10/hr browser time, $4/GB residential proxy, $0.005 per CAPTCHA solved, and $0.02 per agent step with the AI included. No subscription and unused balance never expires. The homepage has details: Human Browser — pay as you go, no subscription.
From a developer’s perspective, the main decision is: “Do I own and operate the browsers, or do I call out to a managed system?”
What Webwright Gets Right
For engineers, Webwright has some genuinely nice properties.
1. Code-as-Action Matches How Devs Think
If you write Playwright by hand, Webwright is effectively automating the part where you tinker with selectors and small control-flow tweaks. For example:
- Try
get_by_role("button", name="Checkout"), fall back toget_by_text("Checkout"). - Loop through table rows until you find a row containing some key text.
- Use try/except to handle occasional popups.
These are natural in Python but painful to express in a rigid action schema. Code generation lets the model use the full expressiveness of the underlying automation library.
2. Robustness to DOM Churn
By not depending on opaque DevTools node IDs, Webwright can adapt when markup changes. It can inspect the DOM, choose different selectors, and keep going. In practice you still hit edge cases, but you’re closer to how humans debug front-end breakage.
3. Great for Research and Prototyping
The project is tailor-made for researchers exploring:
- New prompt patterns for web agents.
- Feedback loops that minimize hallucinated selectors.
- Safe code execution sandboxes.
You can plug in different models, shaping how verbose or conservative their code is, and measure behaviour. For prototyping new ideas, it’s much faster than re-compiling action schemas.
Where Webwright Hurts in Production
None of this means Webwright is ready to run a gray-area scraping operation or a high-volume B2B integration on the open internet. There are some structural limitations for production use.
No Built-In Stealth or Anti-Bot Handling
Out of the box, Webwright runs on vanilla Playwright. Large sites instrument a long list of signals to spot automation:
- Navigator and window property inconsistencies.
- Weird input event timing or pointer behavior.
- Headless-specific quirks.
- IP reputation and ASN.
Cloudflare, PerimeterX, and similar services flag naive Playwright setups quickly. You can bolt on stealth plugins, proxies, and other mitigations, but you’ll be hand-rolling infrastructure that a managed platform already gives you.
No CAPTCHA Solving or HITL
CAPTCHAs are a fact of life. Webwright itself doesn’t know what to do when the page is a ReCAPTCHA puzzle. You’d have to:
- Detect challenge UIs.
- Send screenshots or HTML to a solver system.
- Feed solved tokens back into the Playwright session.
If the site escalates to more sophisticated challenges, you might need a real human in the loop. Webwright doesn’t ship any of this out of the box.
No Multi-Session Orchestration
Need 500 parallel sessions running tasks with retries, per-IP quotas, and backoff behaviour? That’s on you. With Webwright (and Browser Use), you’re operating the fleet:
- Scheduling jobs and managing queues.
- Rotating proxies and handling IP blocks.
- Aggregating logs and metrics from many processes.
It’s fine for small internal tooling; it becomes a serious engineering project at scale.
When Webwright Is the Right Pick
You don’t use a research toolkit as a drop-in replacement for hardened production infra. Webwright shines in specific scenarios.
1. Research and Agent Design Experiments
If you’re working on new architectures for web agents, Webwright gives you a clear playground:
- Change the prompting style and compare task success rates.
- Introduce memory modules or retrieval over past actions.
- Test how different models behave with unconstrained code generation.
It’s ideal for papers, internal prototypes, and benchmarks.
2. Controlled Internal Tools
On intranet apps, admin panels, or QA staging environments, you don’t care about stealth or CAPTCHAs. What you want:
- Flexible interaction with custom UIs.
- Rapid refactoring while your front-end evolves.
- Agent-like automation that can reason about form flows.
Webwright is a good match: internal domains are stable, defenses are minimal, and you control both ends.
3. Prototyping Agent Patterns Before Hardening
Code-as-action lets you sketch behaviours quickly. Once you know what works:
- Port stable flows into a structured action system like Browser Use.
- Or encode them as deterministic steps for a managed API like Human Browser.
This “explore with Webwright, stabilize elsewhere” pattern is pragmatic and keeps research and production concerns cleanly separated.

When Browser Use Wins
Browser Use trades some flexibility for guardrails and a more mature ecosystem.
Structured Output and Easier Observability
Because the LLM must choose from a fixed action schema, you get structured logs automatically:
- Every action is a known type with known parameters.
- You can compute metrics: clicks per task, selector failure rates, average steps.
- Post-hoc debugging is easier: no arbitrary code to sift through.
For production LLM agents plugged into backends, structured actions are often easier to manage than free-form code.
Ecosystem and Community Patterns
Browser Use has an ecosystem of recipes and example flows. Webwright is still early; you’ll write more from scratch:
- Auth patterns for common SaaS apps.
- Opinionated error-handling logic.
- Integration with orchestration frameworks.
That doesn’t mean Browser Use is a managed platform; it still runs on your infra and inherits the same stealth/anti-bot challenges as any other self-hosted Playwright solution. But for teams that want a “batteries-included” developer library instead of a research kit, it’s more approachable.
When You Need Managed & Stealth: Human Browser
If your workflows hit real-world websites with active anti-bot systems, you eventually confront the operational overhead Webwright and Browser Use push onto you:
- Running and scaling browser clusters.
- Keeping stealth techniques up to date.
- Handling CAPTCHAs at volume.
- Managing IP reputation across regions.
Human Browser is explicitly designed to take that off your plate. Pricing is transparent and pay-as-you-go: $0.10 per hour of browser time, $4 per GB of residential proxy bandwidth, $0.005 per CAPTCHA, and $0.02 per agent step with the AI included. You can try it for $1, and there’s no subscription; unused balance doesn’t expire.
For tasks where uptime and success rates matter more than fine-grained control over Playwright code, you:
- Describe a task (e.g., “log in, export a CSV, upload it somewhere”).
- Send it to the A2A endpoint at https://agent.humanbrowser.cloud/a2a.
- Let Human Browser choose the right combination of browser, proxy, and CAPTCHA handling.
For a broader review of where managed browser APIs make sense compared to self-hosted stacks, see the breakdown in this browser automation API guide.
Try It Yourself: Minimal Examples
Let’s look at realistic, minimal snippets for all three approaches using Node.js for Browser Use and Human Browser, and Python for the Microsoft Webwright style.
1. Microsoft Webwright-Style Loop (Python + Playwright)
This is not a full recreation of Webwright, but it captures the core loop: summarize page state, ask an LLM for the next chunk of Playwright code, execute it.
import asyncio
import json
from playwright.async_api import async_playwright
import openai # or your preferred LLM client
openai.api_key = "YOUR_API_KEY"
SYSTEM_PROMPT = """
You are a Python assistant that controls a web browser using Playwright.
You can only use the provided `page` object. Write one async function
`async def step(page): ...` that performs the NEXT small step toward the
goal and then returns.
Constraints:
- Do not import modules.
- Do not access the filesystem or network directly.
- Use robust selectors (get_by_role, get_by_text, etc.).
""".strip()
async def llm_next_step(goal: str, obs: str) -> str:
messages = [
{"role": "system", "content": SYSTEM_PROMPT},
{"role": "user", "content": json.dumps({
"goal": goal,
"observation": obs,
})},
]
resp = openai.ChatCompletion.create(
model="gpt-4.1-mini",
messages=messages,
temperature=0.2,
)
return resp["choices"][0]["message"]["content"]
async def main():
goal = "Search for 'microsoft webwright github' and open the repo."
async with async_playwright() as p:
browser = await p.chromium.launch(headless=False)
page = await browser.new_page()
await page.goto("https://www.bing.com")
for i in range(10): # max 10 steps
# Simple observation: URL and title; in Webwright you'd add DOM excerpts
obs = json.dumps({
"url": page.url,
"title": await page.title(),
})
code = await llm_next_step(goal, obs)
print(f"\n[step {i}] LLM code:\n{code}\n")
# Execute the generated `step(page)` in a restricted namespace
local_ns = {}
try:
exec(code, {"__builtins__": {}}, local_ns)
step_fn = local_ns.get("step")
if not step_fn:
raise RuntimeError("LLM did not define step(page)")
await step_fn(page)
except Exception as e:
print("Execution error:", e)
break
await browser.close()
if __name__ == "__main__":
asyncio.run(main())
This is roughly what Microsoft Webwright formalizes and hardens: the contract between page state, prompt, generated code, and the sandbox executor.
2. Browser Use Example (Node.js)
Browser Use hides most of the browser wiring and gives you a “browser agent” driven by structured actions. Actual APIs may change, but conceptually it looks like this:
import { BrowserUse } from "browser-use";
async function run() {
const agent = await BrowserUse.launch({ headless: true });
const result = await agent.run({
goal: "Open the Microsoft Webwright GitHub repo and read the README header.",
maxSteps: 12,
});
console.log("Final result:", result.summary);
await agent.close();
}
run().catch(console.error);
Under the hood, the LLM picks from an action set; you get structured logs for every step rather than arbitrary code snippets.
3. Human Browser A2A Example (Node.js)
With Human Browser, you don’t launch Chromium yourself. You send a JSON task to the A2A endpoint and let the platform handle navigation, stealth, and CAPTCHAs.
import fetch from "node-fetch";
const API_URL = "https://agent.humanbrowser.cloud/a2a";
const API_KEY = process.env.HUMAN_BROWSER_API_KEY;
async function main() {
const task = {
goal: "Open the Microsoft Webwright GitHub repo and return the README title.",
steps: [
{
type: "navigate",
url: "https://github.com/microsoft/Webwright",
},
{
type: "extract",
selector: "article.markdown-body h1, article.markdown-body h2",
label: "readme_title",
},
],
};
const resp = await fetch(API_URL, {
method: "POST",
headers: {
"Content-Type": "application/json",
Authorization: `Bearer ${API_KEY}`,
},
body: JSON.stringify(task),
});
if (!resp.ok) {
console.error("Request failed", resp.status, await resp.text());
return;
}
const data = await resp.json();
console.log("Task result:", data.outputs.readme_title);
}
main().catch(console.error);
This moves you from “host and protect browsers yourself” to “treat browsers as an API.” Install instructions and SDKs are at /install, and cost breakdowns are on /pricing.
How to Choose for 2026 Projects
Given the tradeoffs, the choice is usually straightforward:
- Pick Microsoft Webwright when you want to experiment with code-as-action, research agent architectures, or build internal tools on trusted domains.
- Pick Browser Use when you want structured actions, easier observability, and a dev-friendly library for LLM-driven UI flows that you still self-host.
- Pick Human Browser when your workloads need stealth-hardened automation, global residential IPs, and built-in CAPTCHA/HITL for real production sites.
If you’re designing an agent-heavy system from scratch, it’s worth spending time understanding how these browser agents behave in the wild. The broader patterns and pitfalls are covered in the open-claw style analysis at /blog/ai-agent-browser-automation-openclaw.
Frequently asked questions
What is Microsoft Webwright?
Microsoft Webwright is a research project where an LLM writes Playwright Python code step-by-step to control a browser instead of choosing from a fixed action list.
How is Webwright different from Browser Use?
Webwright lets the model generate raw Playwright code per step, while Browser Use forces the model to pick from a predefined structured action set, making behaviour easier to validate.
Is Microsoft Webwright production-ready for large-scale scraping?
Not by itself. It lacks built-in stealth, CAPTCHA solving, and multi-session orchestration, so you must engineer that infrastructure if you want to run it at scale on the open web.
When should I use a managed browser API like Human Browser?
Use Human Browser when you need stealth-hardened browsers, residential proxies across many countries, automatic CAPTCHA solving, and managed orchestration instead of running Playwright clusters yourself.
Can I combine Webwright with Human Browser?
Yes. You can prototype agent logic with Webwright locally, then move stable flows to Human Browser by calling its A2A API so production workloads benefit from managed browsers and stealth.