Skip to content

Agent DX improvement: The locator API surface isn't discoverable without decompiling jars #157

Description

@peholmst

Problem. The locators are testers with their own vocabulary, not proxies of
the components — getSelected() not getValue(), selectItem(String) not
setValue(T), getSuggestions(), open()/close(). That's a defensible design,
but the vocabulary is undocumented per component, so the discovery loop is:
guess a method → compile error → javap the jar → find the real name.

unzip -o browserless-test-shared-1.1.1.jar -d /tmp/bl
javap -p -cp /tmp/bl com.vaadin.flow.component.textfield.BigDecimalFieldLocator

Cross-cutting helpers are the worst hit: Locator.inside(...), atIndex(int),
withCondition(Predicate), withClassName(String...), invalidate() and
components() are all useful and all invisible unless you read the base class.

Ask. Publish the locator surface in the browserless testing docs — a table of
findX() → locator → its methods (generated from the source, so it can't drift),
plus a page on the base Locator filters. Failing that, ship
-sources/-javadoc jars prominently enough that IDE completion carries the
docs.

Copied from https://github.com/vaadin/agentic-dx-improvement/issues/107

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions