fix(CDPBrowser): support ARIA radiogroups in selectOption, fix waitInUrl message - #5711
Merged
Conversation
…Url message The Obscura CI job had 13 failing tests. 12 of them were not Obscura-specific: they fail identically against Chrome (test/helper/CDPBrowser_chrome_test.js) and only surfaced here because Obscura is the sole CDPBrowser variant with a CI job. selectOption had no radiogroup branch (11 failures). Locator.field.labelContains matches .//*[@aria-label = ...], so the [role="radiogroup"] element was found — the client's select action then looked only for [role="option"] children and returned false. It now clicks the [role="radio"] whose accessible name matches, exact match first (the fixture's "Compact" / "Compact mode" siblings require it), and lets the widget check it and uncheck the rest. Passing several options returns a sentinel instead of throwing in-page, so selectOption raises the "radio group holds one value" error from Node. waitInUrl reported the resolved absolute URL instead of the part it was given (1 failure), so the message read "expected url to include http://host/info2". 75f1221 restored the substring matching but left the message resolving. The 13th is an Obscura/React interop gap with Base UI radios and is skipped with the reason; Radix and plain radio groups pass on Obscura. Obscura is bumped to v0.2.2 (version + tarball sha256, install URL, regenerated docs). Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_017bdxGACghDuRVjn3hzmdy4
DavertMik
force-pushed
the
fix/cdpbrowser-radiogroup-select
branch
from
September 10, 2026 00:18
00982d9 to
066bdfc
Compare
0.2.2 gates DOM.setFileInputFiles behind --allow-file-access, so attachFile failed with "DOM.setFileInputFiles is disabled" on a self-launched server. The flag exists in 0.2.0 too, so passing it works against both. Also drops "file uploads" from the documented limitations: they work, and the two skipped #attachFile tests are skipped for an unrelated <select multiple> bug, not for lack of upload support. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_017bdxGACghDuRVjn3hzmdy4
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes the 13 failing tests in the Obscura Helper Tests job, and updates Obscura to v0.2.2.
12 of the 13 failures were not Obscura-specific. They fail identically against Chrome (
test/helper/CDPBrowser_chrome_test.js) and only surfaced here because Obscura is the only CDPBrowser variant with a CI job. The fixes are therefore inCDPBrowser.jsand the client script, notObscura.js.selectOptionhad no radiogroup branch — 11 failuresLocator.field.labelContainsmatches.//*[@aria-label = ...], so the[role="radiogroup"]element was being found. The client'sselectaction then looked only for[role="option"]children, found none, and returnedfalse— henceOption "Compact" not found in Density.It now clicks the
[role="radio"]whose accessible name matches, exact match first (the fixture'sCompact/Compact modesiblings require exact-before-fuzzy), and lets the widget check it and uncheck the others — the same approach Playwright takes. Passing several options returns a sentinel rather than throwing in-page, soselectOptionraises theradio group holds one valueerror from Node.waitInUrlreported the wrong URL — 1 failureThe message used
resolveUrl(urlPart)instead ofurlPart, so it readexpected url to include http://127.0.0.1:8000/info2. 75f1221 restored the substring matching but left the message resolving.resolveUrlis still used bywaitUrlEquals, so the import stays.Base UI radios on Obscura — 1 failure, skipped
Genuinely Obscura-only. The click reaches the group, the React root and
document; Base UI re-dispatches it to its hidden<input type="radio">; React's value tracker is intact — but component state never moves, and clicking that hidden input directly doesn't move it either. No small helper-side fix exists, so it's skipped with the reason recorded. Radix and plain radio groups pass on Obscura.Worth noting for anyone tracking Obscura: on 0.2.0
input.click()on a checkbox/radio never toggledcheckednor firedinput/change. 0.2.2 fixes that — but the Base UI radio still doesn't respond, so that wasn't the cause.Obscura v0.2.0 → v0.2.2
Workflow
OBSCURA_VERSIONandOBSCURA_SHA256(hash computed from the downloaded release asset), the install URL in the JSDoc, andnpm run docsregenerated — which touched exactly that one URL line.Verification
CDPBrowser_chrome_test.js, radiogroups/waitInUrl/ARIA)The full unit suite has only ever run against 0.2.0 locally — 0.2.2 also changed
Element.labels,HTMLLabelElement.controlandDOM.getBoxModel, so this CI run is the first full check on the new binary.🤖 Generated with Claude Code
https://claude.ai/code/session_017bdxGACghDuRVjn3hzmdy4