Halmurat T.
Halmurat T.

Senior SDET

Home Blog Books ask About

The Dispatch

Weekly QA notes from the trenches.

Welcome aboard!

You're on the list. Expect real-world QA insights — no fluff, no spam.

© 2026 Halmurat T.

Automation 29
  • Selenium
  • Playwright
  • Appium
  • Cypress
AI Testing 68
CI/CD 13
  • GitHub Actions
  • Slack Reporting
QA Strategy 11
Case Studies 9
Blog/AI Testing
AI TestingHalmurat T./September 8, 2026/16 min

Your Checkout Works. An AI Agent Can't Finish It.

Filed underai-testing/ai-agents/playwright/llm/cicd
Your Checkout Works. An AI Agent Can't Finish It.

Table of Contents
  • Is agentic traffic actually big enough to test for?
  • Why do AI browser agents fail flows that humans complete?
  • Semantic invisibility
  • Interaction assumptions
  • Identity and defenses
  • What is an agent-readiness gate?
  • How do you assert your agent-facing contract in CI?
  • Freeze the shape, not just the names
  • How do you run a real agent without a flaky pipeline?
  • Will your own bot defenses block the agents you want?
  • What this catches that your suite doesn’t
  • What I’d do differently
  • Start here

On this page

  • Is agentic traffic actually big enough to test for?
  • Why do AI browser agents fail flows that humans complete?
  • Semantic invisibility
  • Interaction assumptions
  • Identity and defenses
  • What is an agent-readiness gate?
  • How do you assert your agent-facing contract in CI?
  • Freeze the shape, not just the names
  • How do you run a real agent without a flaky pipeline?
  • Will your own bot defenses block the agents you want?
  • What this catches that your suite doesn’t
  • What I’d do differently
  • Start here

Pull your CDN logs and filter for Comet, Atlas, and Claude user agents. You will find sessions. Then check how many of them completed a purchase, a signup, or a support ticket. If your flows have the defects below, that number can sit near zero while your suite stays green and your human conversion rate looks fine. Your app now has a second class of user, that user fails in the same three ways every time, and you have no test that has ever been run by anything other than a human-shaped script.

This is not an accessibility post wearing a costume. It’s a coverage gap. Every test you own drives the browser the way you decided to drive it: your fixtures know the selectors, your page objects know the flow, your waits know the timing. An agent knows none of that. It reads the accessibility tree, picks a control, and acts. If your “Continue” button is a styled div, the agent doesn’t see a slow button — it sees no button. Your suite will never tell you, because your suite was written by someone who already knew where to click.

Is agentic traffic actually big enough to test for?

Yes, and the growth rate is the part that matters, not the absolute number. Automated requests now make up 57.5% of HTML web traffic against 42.5% from humans, and agentic AI traffic specifically grew roughly 7,851% year over year. Agentic bots are still only a couple of percent of all non-human traffic — most of it is training crawlers — but they are the couple of percent that tries to transact.

The distribution is concentrated enough to test against. As of June 2026, Comet held 47.6% of agentic traffic, Claude 20.8%, and Atlas 16.5% — three targets cover 85% of the surface. And the vertical split tells you who should care first: ecommerce took 43.8% of AI agent volume that month, followed by media at 41.3% and travel at 13.5%.

§ The user class you have no tests for

57.5%

Of HTML traffic

Automated, not human

47.6%

Comet's share

Of agentic traffic, June 2026

43.8%

Ecommerce

Share of AI agent volume

Meanwhile the agents are not good enough to route around your mistakes. The best single agent on the WebArena benchmark reaches 61.7% task completion against 78% for humans, and the failure modes are boringly specific: dynamic UI elements like floating promos cause 73% of reading failures, and adversarial mechanisms like CAPTCHAs account for 36% of handling failures. Those are not model problems you have to wait out. Those are your promo modal and your bot challenge.

Why do AI browser agents fail flows that humans complete?

Because agents perceive a much thinner version of your page than a human does, and act on it with no memory of your product’s conventions. In practice the failures fall into three classes, and each one needs a different test.

Semantic invisibility

The agent reads roles and accessible names. Anything without them is not “hard to use” — it is absent. This is not a rare defect: the 2026 WebAIM Million found empty buttons on 30.6% of the top million home pages, up from 29.6% the year before. A button with no accessible name is a control your entire agentic funnel cannot operate, sitting on a third of the web, getting slightly worse each year.

The nasty part is that your existing tests actively hide it. page.click('#submit-btn') passes forever on an unnamed div. So does a text-based locator. Only a role-and-name locator would have failed — which is the same argument I made for getByRole over CSS locators, except now the cost of ignoring it shows up in revenue rather than in a screen reader audit nobody reads.

Interaction assumptions

Hover-only menus, drag-to-reorder, canvas widgets, infinite scroll, and “click anywhere to dismiss” overlays all encode a mouse-shaped user. Agents mostly don’t hover, rarely drag well, and read a canvas as a blank rectangle. A newsletter modal that a human swats away in 200ms is, to an agent, an unlabeled overlay intercepting every click — which is exactly the 73% dynamic-element reading failure from WebArena, showing up in your funnel.

Identity and defenses

The third failure isn’t in your app at all. It’s your WAF. Bot management that was tuned to stop scrapers cannot tell a customer’s shopping agent from a credential stuffer, so it challenges both. You built a flow the agent could complete and then blocked it at the door.

[ WARNING ]

Agent-readiness is not “make the app easier to automate for anyone.” Everything here makes your app legible, not unauthenticated. Keep authentication, authorization, and rate limits exactly where they are — and remember that a page an agent can read is a page an attacker can plant instructions in. I covered that attack surface in prompt injection through the app under test.

What is an agent-readiness gate?

It’s three layers of check, deliberately split by determinism so you don’t put a stochastic agent in your PR path. A cheap deterministic contract test runs on every commit, a real agent run happens nightly as an eval, and a defense-posture test runs whenever your WAF config changes.

Freeze the agent-facing contract (per PR, deterministic)

Assert that every actionable node in your revenue flows has a role and an accessible name, and snapshot the shape of the tree. Pure Playwright, no model, milliseconds.

Run a real agent against a real flow (nightly, stochastic)

Give an agent a goal and a step budget, then assert on where it ended up and how it got there — not on the words it produced.

Verify your own defenses let the right agents in (on WAF change)

Prove a signed agent reaches checkout and an unsigned scraper still doesn’t.

This split is the same two-lane pattern I use for anything model-driven: mock in CI, eval nightly. Layer 1 is the one that pays for itself immediately.

How do you assert your agent-facing contract in CI?

Take an ARIA snapshot of the flow and fail the build on any actionable node without a name. page.ariaSnapshot() returns YAML where a named control renders as - button "Place order" and an unnamed one as bare - button, so the check is a string filter — no accessibility engine, no model, no flake.

tests/agent-readiness/contract.spec.ts
import { test, expect } from '@playwright/test';
// Roles an agent must be able to name before it can act on them.
const ACTIONABLE =
/^\s*-\s(button|link|textbox|combobox|checkbox|radio|menuitem|tab|switch)\b/;
test('every actionable node in checkout has an accessible name', async ({ page }) => {
await page.goto('/checkout');
const snapshot = await page.getByRole('main').ariaSnapshot();
// Playwright quotes the accessible name: `- button "Place order"`.
// No quotes on an actionable line means the agent sees a control it cannot name.
const invisible = snapshot
.split('\n')
.filter((line) => ACTIONABLE.test(line) && !line.includes('"'));
expect(invisible, `Agent-invisible controls:\n${invisible.join('\n')}`).toEqual([]);
});

Run that against your top three flows and you will get failures on day one. Every one of them is a control that an agent — and a screen reader, and your getByRole locators — cannot address.

There is one gap in this check, and it’s the one that bites. It finds controls with a role and no name — the icon-only close button, the unlabeled input, the link that wraps a bare SVG. It cannot find a <div onclick="next()"> with no role at all, because a roleless div never enters the accessibility tree in the first place. There is nothing to flag. The check reports zero problems for the single worst offender, which is why the next section is not optional.

Freeze the shape, not just the names

Names alone don’t stop a redesign from removing the guest-checkout path entirely — and, per the gap above, they can’t see a control that fell out of the tree. A frozen snapshot catches both, because a missing node is a diff. Store the tree as a reviewable artifact so structural changes show up in the PR instead of in a support ticket:

tests/agent-readiness/contract.spec.ts
// Stored at tests/agent-readiness/contract.spec.ts-snapshots/checkout.aria.yml
await expect(page.getByRole('main')).toMatchAriaSnapshot({ name: 'checkout.aria.yml' });

Generate the baseline with npx playwright test --update-snapshots, then read the YAML before you commit it — a snapshot you accepted without reading is worse than no snapshot. For the critical region only, add - /children: equal to the YAML so a silently dropped step fails instead of partially matching. This is the same accessibility-tree-as-contract idea I applied to anchoring AI test agents, pointed at the product instead of at the tests.

[ TIP ]

Scope the snapshot to a landmark (getByRole('main')), never the whole page. Headers and footers churn constantly and a page-level ARIA snapshot becomes a rubber-stamp diff within two sprints.

How do you run a real agent without a flaky pipeline?

Move it out of the PR path and assert on the trajectory, not the prose. A nightly job gives an agent a goal, a step budget, and a real browser, then checks where it landed and whether it thrashed on the way. Playwright’s MCP server hands the agent an accessibility snapshot with stable refs rather than screenshots, which keeps the run cheap and the failures readable.

tests/agent-eval/checkout.eval.spec.ts
import { test, expect } from '@playwright/test';
import { runAgent } from './harness'; // your model + Playwright MCP tools
const GOAL = 'Buy the cheapest in-stock blue running shoe in size 10 as a guest.';
const STEP_BUDGET = 25;
test('agent completes guest checkout within budget', async ({ page }) => {
const run = await runAgent({ page, goal: GOAL, maxSteps: STEP_BUDGET });
expect(run.finalUrl).toContain('/order/confirmation');
expect(run.steps.length).toBeLessThanOrEqual(STEP_BUDGET);
// The signal that matters: an agent re-clicking one control is a UI defect,
// not a model defect. Three strikes means something is swallowing the click.
const stuck = run.steps.filter((s, i) => s.target === run.steps[i - 1]?.target);
expect(stuck.length, 'agent re-clicked the same control').toBeLessThan(3);
});

Two rules keep this useful. First, run it k times and gate on the pass rate, never on a single run — a stochastic check with a binary gate is just a coin flip with a build number, which is the whole argument for a pass@k gate. Second, assert on what the agent did, not what it said, for the reasons in trajectory tests for browser agents. “The agent said it ordered the shoes” is not evidence that an order exists.

The step budget is the sleeper feature. A flow that used to take an agent, say, 9 steps and now takes 22 is a regression nobody would have filed, and it usually points at a new interstitial.

Will your own bot defenses block the agents you want?

Probably, unless you’ve checked since your last WAF tune. The current answer is Web Bot Auth, an IETF-track standard built on HTTP Message Signatures (RFC 9421) that lets an agent cryptographically prove who it is instead of relying on a spoofable user agent. Cloudflare’s signed agents allowlist covered an estimated 84% of identified AI browser traffic as of June 2026, and AWS WAF, Vercel, Shopify, and Akamai have shipped support.

Which means it’s testable. Two cases, one file:

tests/agent-readiness/bot-defense.spec.ts
import { test, expect } from '@playwright/test';
const AGENT_UA = process.env.AGENT_UA!; // a real agentic-browser UA string
test('a signed agent reaches checkout', async ({ request }) => {
const res = await request.get('/checkout', {
headers: {
'user-agent': AGENT_UA,
'signature-agent': process.env.SIGNATURE_AGENT!, // key directory URL
'signature-input': process.env.SIGNATURE_INPUT!,
signature: process.env.SIGNATURE!,
},
});
expect(res.status()).toBe(200);
});
test('an unsigned client with the same UA is still challenged', async ({ request }) => {
const res = await request.get('/checkout', { headers: { 'user-agent': AGENT_UA } });
expect([401, 403]).toContain(res.status());
});

The second test is the one that keeps you honest. Plenty of teams “fix” agent traffic by allowlisting a user-agent string, which is not a fix — it’s an open door with a sign on it. Assert that the unsigned request still fails, or your next incident is an agent-shaped scraper walking through the hole you opened for Comet.

What this catches that your suite doesn’t

FailureCaught byWhy the existing suite misses it
Unnamed submit controlLayer 1, per PRCSS and text locators bind to it happily
Guest-checkout path removedLayer 1 snapshot diffNo test asserted the path exists as a shape
Promo modal intercepting clicksLayer 2 step budgetFixtures dismiss it in beforeEach
New interstitial inflates the step countLayer 2 step budgetNothing measures effort, only outcome
WAF challenges customer agentsLayer 3Staging has bot management disabled

That last row is the one I’d bet on. Bot management off in lower environments is close to universal, so the defense that breaks agentic checkout is, by construction, the one component your pipeline never exercises.

What I’d do differently

I’d have started with Layer 1 alone and shipped nothing else for a month. The agent-eval harness is the fun part and it’s the part that generates the least signal per hour spent — nightly runs are noisy, model updates move your baseline, and you’ll spend more time tuning the step budget than fixing defects. The unnamed-control check is fifteen lines, runs in under a second, never flakes, and finds real breakage on the first execution.

I’d also stop calling it agent-readiness internally. Framed that way it competes with roadmap work and loses. Framed as “our checkout has controls that no keyboard, screen reader, or agent can operate,” it’s a defect, and defects get fixed.

Start here

Open a terminal, point page.getByRole('main').ariaSnapshot() at your single highest-value flow, and count the actionable lines with no quoted name. That number is how many controls your agentic traffic cannot touch, and you can have it in ten minutes. Everything above is just what you do after you see it.

§ Frequently Asked FAQ
+ Isn't this just accessibility testing with extra steps?

The checks overlap heavily, but the failure model differs. An accessibility audit asks whether a human using assistive technology can complete the flow and grades severity by user harm. An agent-readiness gate asks whether a non-human client can complete a transaction, and grades by revenue path.

The overlap is a feature — fixing an unnamed button helps both — but agent-readiness also covers step budgets, interstitials, and bot-defense posture, which no WCAG audit will flag.

+ Should the agent eval block a pull request?

No. A model-driven run is stochastic, and a binary gate on a stochastic check produces a flaky build that teams learn to rerun until green.

Run the agent nightly, execute the goal k times, and gate on the pass rate across runs — see pass@k gating. Keep the deterministic ARIA contract check in the PR path where it belongs.

+ Do I need Playwright MCP to run an agent against my app?

No, but it removes most of the harness work. The MCP server exposes an accessibility snapshot with stable element refs, so the agent acts on semantics instead of pixel coordinates — cheaper in tokens and far more stable across layout changes.

You can build the same loop with a vision model driving raw Playwright calls. It will cost more and break on a four-pixel shift.

+ Won't making my app agent-friendly help scrapers too?

Legibility and authorization are separate controls. Adding an accessible name to a button does not remove authentication, rate limits, or payment verification — and that name is already exposed to every screen reader on the platform.

The real risk sits elsewhere: content an agent reads can carry injected instructions. Treat any user-generated text on an agent-reachable page as untrusted input.

+ How do I know which agents are hitting my app today?

Filter your CDN or edge logs by the known agentic user agents — Comet, Atlas, and Claude cover roughly 85% of current agentic traffic — and segment those sessions against your normal funnel.

If completion is near zero while human completion is normal, you have a semantics or defense problem, not a demand problem. Signed-agent identity via Web Bot Auth gives you a more reliable signal than user-agent strings alone.

§ Further Reading 03 of 03
01AI Testing

Your AI Agent Is Looping, and No Test Caught It

A max-iterations cap hides livelock instead of catching it. Here's the Playwright test a senior SDET writes to detect cyclic tool calls before they hit prod.

Read →
02AI Testing

Your AI Agent Retries and Charges the Card Twice

A tool call commits but the response is lost, so your AI agent retries and double-charges. Here's the Playwright test a senior SDET writes for exactly-once.

Read →
03AI Testing

Your AI Feature Has Three Clocks. They Disagree.

Your browser clock, your server clock, and the model's idea of now rarely agree. Pin all three in Playwright before a date bug quietly reaches production.

Read →

Don't miss a thing

Subscribe to get updates straight to your inbox.

HT

No spam · Unsubscribe anytime

Welcome aboard!

You're on the list. Expect real-world QA insights — no fluff, no spam.

§ Colophon

Halmurat T. — Senior SDET writing about test automation, CI/CD, and QA strategy from 10+ years in the enterprise trenches.

Set in
IBM Plex Sans, Lora, and IBM Plex Mono.
Built with
Astro, MDX, Tailwind CSS & Expressive Code. Served by Vercel.
Privacy
No cookies. No tracking scripts on the main thread — analytics run sandboxed via Partytown.
Source
github.com/Halmurat-Uyghur
Terminal
Try /ask to query Halmurat's notes in a shell prompt.

© 2026 Halmurat T. · Written in plain text, shipped in plain time.

Search
Esc

Search is not available in dev mode.

Run npm run build then npm run preview:local to test search locally.