From dbfbc14eb5bf28a6e5faf1a7547563e8bb5137ab Mon Sep 17 00:00:00 2001 From: PJ Date: Wed, 19 Aug 2026 10:37:10 +0530 Subject: [PATCH] test(chrome): compare the hint keys and placeholder across both matchers The page gains four fields that differ one rung at a time: a bound label, a placeholder, a placeholder an aria-label outranks, and the name the form gives the field. Only the placeholder rung was reachable before, so hintText and placeholderValue named a field on the goja host and no element at all on web for the other three, and named the field here and nothing there for the rung the ladder passed over. placeholder was measured empty on both hosts because nothing on the page carried the attribute, which said nothing about it. It now names the field the markup wrote it on and not the field whose hint is its aria-label. The third resolver reads the same selectors: what TranslateStringSelector builds for a hint key has to match nothing over CDP rather than the field carrying the value as a placeholder. --- .../driver/chrome/selector_parity_test.go | 164 +++++++++++++++++- .../chrome/testdata/selector-parity.html | 11 ++ 2 files changed, 173 insertions(+), 2 deletions(-) diff --git a/internal/driver/chrome/selector_parity_test.go b/internal/driver/chrome/selector_parity_test.go index 0d64f61..8fe625b 100644 --- a/internal/driver/chrome/selector_parity_test.go +++ b/internal/driver/chrome/selector_parity_test.go @@ -240,7 +240,88 @@ func TestSelectors_ResolveTheSameElementsAsTheWebRuntime(t *testing.T) { name: "not secure", selector: "secure:false", object: objectSelector("secure", "false"), - want: []string{"login_email", "login_note", "login_terms"}, + want: []string{ + "login_email", "login_note", "login_terms", + "hint_phone", "hint_search", "hint_amount", "hint_code", + }, + }, + { + // hintText is the accessible-name ladder both producers derive: + // the field's aria-label, the