Skip to content

Web-component / shadow-DOM form gotchas hit on aa.com (Angular Material + adc-* design system) #1

Description

@Turetsky

Logging issues hit while automating a 9-passenger form on aa.com (Angular Material mat-dialog + a custom adc-* web-component design system). Filed at the user's request for FastLink improvement.

1. Native <select> options can't be picked by fast_click_xy / fast_do

Chrome renders an open <select>'s option list as an OS-native popup outside the page coordinate space, so CDP synthetic clicks land on the page beneath the popup and just dismiss it. fast_do correctly typed text inputs but reported every option target as "not visible on screen" and skipped them.

  • Workaround that works: fast_select_option (kind: native-select) ✅, or fast_evaluate setting .value + dispatching events.
  • Suggestion: have fast_do's planner route <select> targets through fast_select_option semantics instead of click-the-option.

2. fast_evaluate can't see elements in CLOSED shadow roots

The adc-input name fields and the dialog Save button live in closed shadow roots. A manual document.querySelectorAll + recursive el.shadowRoot walk returns nothing for them (closed roots aren't traversable), while fast_snapshot / fast_select_option / fast_fill (stable-id / a11y layer) DO reach them. Net effect: JS could set the light-DOM <select>s but names had to go via fast_do / coordinate typing.

  • Worth documenting which tools pierce closed shadow vs not.

3. Biggest one: programmatic select changes don't satisfy validators across a shadow boundary unless events are composed: true

Setting .value + dispatchEvent(new Event('change', {bubbles:true})) updated single selects (gender, country, state) fine, but did NOT update a composite date-of-birth control (3 month/day/year selects feeding one Angular validator). The validator's (change) listener sits outside the selects' shadow root, and a non-composed event does not cross the shadow boundary, so the control stayed Please enter a valid date no matter the value.

  • Fix: dispatch new Event('change', {bubbles:true, composed:true}) (and same for input) — instantly validated.
  • Suggestion: fast_select_option / any JS-injection fill helper should dispatch composed:true events by default, so it works on web-component design systems with composite controls.

4. Minor

  • fast_locate (vision) returns found:false when the target is scrolled out of the viewport — expected, but required scroll-then-relocate loops.
  • devicePixelRatio scaling: screenshots are at DPR (1.25 here), so reading pixel coords off a screenshot for fast_click_xy needs /dpr. Common foot-gun; maybe note it or expose a screenshot-px→CSS helper.

Environment: Windows, Chrome via FastLink extension, aa.com passenger-details page.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions