Repository navigation
native selects and fake ones
Two controls on a page can look identical and be completely different things. A
real <select> is one element the browser draws; a "custom select" is a button
that shows a list of divs. An agent has to treat them differently, and the useful
news is that it finds out immediately rather than silently doing the wrong thing.
Measured on 2026-09-17, both on one page served from 127.0.0.1:
| what happened | |
|---|---|
browser_select_option on a real <select>
|
0.06 s, the page's change handler fired, the value was b
|
browser_select_option on a div that looks like one |
refused: Page.select_option: Element is not a <select> element
|
browser_click on the button, then on the option |
worked, the page recorded the choice |
An agent handed a custom dropdown and a select-shaped tool has a few ways to go wrong, and most of them are quiet. It could click the button and report success without the value having changed. It could set an attribute from script, which produces a change no handler hears about. It could pick whatever option is nearest.
Instead it gets back a sentence naming the actual problem: the element is not a
<select>. That is immediately actionable, both for a person reading the
transcript and for a model deciding what to do next, and it costs the eighth of a
second the failed call took.
This is the same design as the refusal on scripted interaction, where the message names the tool to use instead rather than just declining. That one is quoted in full in keeping an AI browser agent out of destructive actions.
The snapshot reports the tag, so a real select is identifiable without guessing:
an entry whose tag is select takes the single call. Anything that behaves like
a dropdown and reports as a button, a div or a span needs the two-click
route.
That is worth putting in the task when you know the page, because it saves the agent a failed call and a decision. When you do not know the page, letting it try the cheap call first and read the refusal is a perfectly good strategy, which is not always true of failed calls.
Three details separate a version that works from one that half works.
Open, then choose, then confirm. Click the control, read the page to see the options that appeared, click the one you want. Reading in the middle matters: the options often do not exist in the document until the control is opened, so a selector planned in advance may not resolve yet.
Some of them need the keyboard, not the mouse. Comboboxes built on a text input filter as you type and commit on Enter or on a click. There, typing the first characters and then clicking the filtered option is more reliable than scrolling a long list.
Verify the value, do not assume the click. Custom dropdowns frequently close on any click, including one that missed. The check is whatever the page shows afterwards: the button's label, a summary line, a hidden field. Without it a missed option looks exactly like a chosen one.
That last point is the local form of a general rule about reading the field back after filling it, which is in one form submission per spreadsheet row.
Worth naming because it defeats both routes: a dropdown rendered inside a shadow root or an iframe. The click by selector still works into a shadow root, measured on its own page; inside a frame it does not, and you are on coordinates, per an agent and an iframe.
If a dropdown refuses both the select call and the two-click route while being plainly visible, that is the thing to check, rather than the selector.
If you are on the side of the page rather than the agent: a real <select> costs
one call and sixty milliseconds, and works from the keyboard, with a screen
reader, and on a phone, without anybody writing that behaviour. The custom one
costs two calls, a read in between, and a verification step, and it breaks in the
three ways above.
That is not an argument an agent can make on your behalf, but it is the honest summary of what the measurement shows.
How does an AI agent choose from a dropdown? One call on a real <select>,
measured at 0.06 seconds. On a custom one: click to open, read the options, click
the one you want, verify.
Why did select_option fail? Because the element is not a <select>. The tool
says so by name rather than failing vaguely, which tells you to switch to the
two-click route.
How do I tell which kind it is? The snapshot reports the tag. select takes
the single call; button, div or span means the custom route.
The option I clicked did not take. Custom dropdowns close on any click, including a miss. Read the control's label or the page's summary afterwards instead of trusting the click.
What about a combobox I can type into? Type a few characters to filter, then click the option. Scrolling a long unfiltered list is the fragile version.
See also: getting an AI agent to fill out forms for the other control types and the validation behaviour around them, and what a page snapshot costs, per control, since the tag that distinguishes these two comes from the snapshot.
- Measured 2026-09-17 through this project's MCP server over stdio, on one page carrying a real
<select>and a button-plus-list pretending to be one, served from127.0.0.1.browser_select_optionon the real one completed in 0.06 s and the page's change handler recorded the value; on the div it returnedPage.select_option: Element is not a <select> element, quoted verbatim. Two clicks on the custom control set it, confirmed by the page's own output element.
The refusal is the part worth remembering. A tool that declines by name is worth more than one that tries its best on the wrong kind of element.
- OpenAI Operator alternatives
- Open-source Operator-style agents
- Is OpenAI Operator still available?
- OpenAI Operator vs Claude computer use
- browser-use alternatives
- Choosing an AI browser agent
- Open-source AI browser agents
- Open-source computer-use agents
- What is an AI web agent?
- AI browser agents vs traditional scraping
- Cloud browser infrastructure for AI agents, explained
- Browserbase alternatives
- Firecrawl vs an AI browser agent
- Skyvern alternatives
- Stagehand vs browser-use
- Project Mariner is gone: what replaced it
- Manus alternatives
- Gemini computer use vs Claude computer use
- A stealth browser MCP, reviewed honestly by its own wiki
- AI browser vs AI browser agent: which one do you want?
- AI browser agent vs RPA: which one fits the job
- AI browser agent vs n8n, Zapier and Make
- Vercel agent-browser alternatives, compared honestly
- What is an agentic browser? Definition and the two kinds
- Open-source agentic browsers: the three layers, compared
- Choosing an MCP server for browser automation: four axes
- Stealth MCP servers compared: Camoufox, nodriver, Patchright
- Playwright MCP alternatives, and the three you don't need
- Autonomous browser agents: the four rungs of autonomy
- What is actually free in the AI browser agent stack
- browser-use on GitHub: what the repo actually gives you
- Playwright MCP vs Chrome DevTools MCP: different jobs
- How to choose among MCP servers: a map by category
- Which MCP servers are worth adding to Claude Code
- MCP on GitHub: finding servers and judging them fast
- MCP vs an API: the decision, and what the wrapper costs
- MCP alternatives: when the protocol is the wrong shape
- Why does my AI agent get blocked?
- The timing signal AI agents give off
- Agent retry loops trip rate limits, not fingerprints
- Claude computer use detected as a bot
- browser-use getting blocked: what you can and cannot change
- Playwright MCP session blocked: four causes, four fixes
- Playwright MCP and captchas: what actually gets you past
- Cloudflare and a browser MCP server: what is being read
- Can an AI agent solve a captcha? The honest answer
- Getting an AI agent to fill out forms
- The best model for an MCP browser agent, and what it really costs
- Browser problem or model problem?
- How to use a Playwright MCP server with Claude Code
- Extracting data to a CSV with an AI agent
- Monitoring a page for changes with an AI agent
- How to let Claude Desktop control a browser
- How to add a browser to Cursor as an MCP server
- Using an AI agent to hunt for apartments
- Getting website data into Google Sheets with an AI agent
- Using an AI agent to download invoices from portals
- AI agents for web research
- Using an AI agent to test your own website
- How to add a browser to Cline as an MCP server
- Posting to social media with an AI agent
- Posting to Facebook with an AI agent
- Posting to Instagram with an AI agent
- Posting to X with an AI agent
- Automating LinkedIn posts: read this first
- Appointment bots: what they are and what an agent can legitimately do
- Track prices across sites with an AI agent
- Build a lead list with an AI browser agent
- Run an AI browser agent on a schedule
- AI browser agent with a local LLM: what changes
- Should you log your AI agent into your accounts?
- How to write a task an AI browser agent can follow
- Move data between two web apps with an AI agent
- The MCP server
- How the tools are shaped, and why
- Playwright MCP vs the Playwright CLI: which fits when
- Playwright MCP: browser is already in use, and the fix
- Playwright MCP best practices: four decisions that matter
- Playwright MCP with a proxy, and the three leaks it leaves
- A browser MCP server in GitHub Copilot: setup and limits
- Using a browser MCP server for web scraping: the pattern
- Which LLM for browser automation: the four properties
- How to build a browser agent, and what to take instead
- Getting an AI agent to log into a website: three routes
- MCP tools, resources and prompts: who controls each
- How many MCP tools is too many? The context arithmetic
- How to build an MCP server: the decisions, not the scaffold
- Local or remote MCP server: what changes, and what does not
- Writing an MCP client in Python: the thirty-line version
- Self-hosted AI agent: what one actually costs to run
- How long an AI browser agent takes per step, measured
- Text, HTML, snapshot or screenshot: what the agent should read
- Giving an AI browser agent a stopping condition
- Keeping an AI browser agent out of destructive actions
- Why did the AI agent click the wrong thing
- When the page changes under the AI agent
- Running one AI agent task across a list of sites
- Seeing a page as it appears in another country
- Getting data out of a dashboard with no export button
- Two browsers in one session: main and support
- Finding the dead links on a site with an AI agent
- Filling a CRM record from a company's website
- One form submission per spreadsheet row, with an AI agent
- Dated screenshots of a page as evidence
- Checking order and delivery status with an AI agent
- Reading a PDF that opens inside the browser
- Summarising a long page or thread with an AI agent
- Collecting every image on a page with its caption
- Collecting event and course listings with an AI agent
- Cancelling a subscription with an AI agent
- What an AI agent can and cannot do inside an iframe
- Shadow DOM and an AI agent: you can click it, you cannot read it
- How to add a browser to Codex as an MCP server
- What a page snapshot costs, per control
- How to let Gemini CLI use a browser
- Native selects and the ones that only look like selects
- Clicking by selector or by coordinates
- How long the agent waits before it gives up
- What a second browser costs
- Uploading a file with an AI agent, and why this one cannot
- Watching the agent work, and when it is worth it
- When not to use an AI browser agent
- Agent or script: deciding once instead of every time
- Using the keyboard instead of the mouse
- Secrets in an agent task: where they end up
- What an agent run should log
- Deduplicating what an AI agent collects
- Normalising values across sites
- Validating an AI agent's output
- Reading a table with an AI agent
- Driving a site's own search and filters
- The task works headed and fails headless
- How to let the AdaL CLI use a browser