Skip to content

fix(CDPBrowser): support ARIA radiogroups in selectOption, fix waitInUrl message - #5711

Merged
DavertMik merged 2 commits into
4.xfrom
fix/cdpbrowser-radiogroup-select
Sep 10, 2026
Merged

fix(CDPBrowser): support ARIA radiogroups in selectOption, fix waitInUrl message#5711
DavertMik merged 2 commits into
4.xfrom
fix/cdpbrowser-radiogroup-select

Conversation

@DavertMik

Copy link
Copy Markdown
Contributor

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 in CDPBrowser.js and the client script, not Obscura.js.

selectOption had no radiogroup branch — 11 failures

Locator.field.labelContains matches .//*[@aria-label = ...], so the [role="radiogroup"] element was being found. The client's select action then looked only for [role="option"] children, found none, and returned false — hence Option "Compact" not found in Density.

It now clicks the [role="radio"] whose accessible name matches, exact match first (the fixture's Compact / Compact mode siblings 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, so selectOption raises the radio group holds one value error from Node.

waitInUrl reported the wrong URL — 1 failure

The message used resolveUrl(urlPart) instead of urlPart, so it read expected url to include http://127.0.0.1:8000/info2. 75f1221 restored the substring matching but left the message resolving. resolveUrl is still used by waitUrlEquals, 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 toggled checked nor fired input/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_VERSION and OBSCURA_SHA256 (hash computed from the downloaded release asset), the install URL in the JSDoc, and npm run docs regenerated — which touched exactly that one URL line.

Verification

result
Chrome (CDPBrowser_chrome_test.js, radiogroups/waitInUrl/ARIA) 25 passing, 0 failing
Obscura 0.2.2, same grep 21 passing, 4 pending, 0 failing
Obscura acceptance on 0.2.2 19 passed
eslint on changed files clean

The full unit suite has only ever run against 0.2.0 locally — 0.2.2 also changed Element.labels, HTMLLabelElement.control and DOM.getBoxModel, so this CI run is the first full check on the new binary.

🤖 Generated with Claude Code

https://claude.ai/code/session_017bdxGACghDuRVjn3hzmdy4

…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
DavertMik force-pushed the fix/cdpbrowser-radiogroup-select branch from 00982d9 to 066bdfc Compare September 10, 2026 00:18
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
@DavertMik
DavertMik merged commit b9a7366 into 4.x Sep 10, 2026
14 checks passed
@DavertMik
DavertMik deleted the fix/cdpbrowser-radiogroup-select branch September 10, 2026 00:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant