Agent DX improvement: Value-bearing locators are write-only — no `getValue()` anywhere
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Newbie friendliness
- 72/100
- Issue type
- Feature
- Clarity
- Mostly clear
- Activity status
- Active
- Tech stack
- java
- Domain
- developer-experience, testing
Research direction
Start with HasValueFilter and the value-bearing locator interfaces, following the existing withValue/setValue path and component().getValue() access. Verify that getValue() is available for every locator supporting value operations, preserve getSelected() for ComboBoxLocator and SelectLocator, and add or update tests for the typed getter behavior.
Written by the indexing model from the issue text.
Description
Problem. Every field locator can write a value but none can read one. The
locators otherwise read as if they proxy the component, so getValue() is the
first thing you reach for, and it doesn't compile.
Surveyed in browserless-test-shared:1.1.1:
| Locator | setValue |
clear |
value getter |
|---|---|---|---|
TextFieldLocator |
✅ | ✅ | ❌ |
TextAreaLocator |
✅ | ❌ | ❌ |
BigDecimalFieldLocator |
✅ | ✅ | ❌ |
NumberFieldLocator |
✅ | ❌ | ❌ |
IntegerFieldLocator |
✅ | ❌ | ❌ |
EmailFieldLocator / PasswordFieldLocator |
✅ | ✅ | ❌ |
DatePickerLocator / DateTimePickerLocator / TimePickerLocator |
✅ | ❌ | ❌ |
ComboBoxLocator / SelectLocator |
❌ (selectItem) |
❌ | getSelected() |
CheckboxLocator |
❌ (click) |
❌ | ❌ |
So a test that asserts "this field defaults to 1" has to leave the locator API:
// Wanted
assertThat(findBigDecimalField().withLabel("Quantity").getValue())
.isEqualByComparingTo("1");
// Actual
assertThat(findBigDecimalField().withLabel("Quantity").getComponent().getValue())
.isEqualByComparingTo("1");
Why it's cheap to fix. HasValueFilter<C extends Component & HasValue<?, V>, V, SELF>
already binds both the component type and the value type — it exists to power
withValue(V). A default accessor on that interface (or a sibling
HasValueAccess) gives every value locator a typed, correct getter with no
per-locator work:
default V getValue() { return ((Locator<C, SELF>) this).component().getValue(); }
Ask. Add getValue() to the value-bearing locators (ideally as one default
method on the existing filter/accessor interface). Keep getSelected() on
ComboBoxLocator/SelectLocator as an alias if the selection vocabulary is
deliberate, but make getValue() work everywhere setValue/withValue does.
Copied from https://github.com/vaadin/agentic-dx-improvement/issues/107
- Dominant language
- Java
- Stars
- 1
- Forks
- 3
- Avg merge
- 1d 19h
- Merged PRs (30d)
- 15
Getting set up
- No Dockerfile or Docker Compose file
- No pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from vaadin/browserless-test
-
Rename MultiSelectComboBoxTester.selectItem(String...) to selectItems(String...)Possibly taken @totally-not-ai claimed this 6 days ago. Open
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
vaadin/browserless-test#291 · 3 comments ·
Maintainers usually reply within 1 day
-
(MultiSelect)ComboBoxTester add support for selectItemContaining(String)Possibly taken @totally-not-ai claimed this 27 days ago. Open
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
vaadin/browserless-test#270 · 3 comments · 1 reaction ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
vaadin/browserless-test#266 · 2 comments ·
Maintainers usually reply within 1 day
-
enhancement
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
vaadin/browserless-test#123 ·
Maintainers usually reply within 1 day
-
withLabel() doesn't find a field labelled by its FormLayout form itemPossibly taken @totally-not-ai claimed this 2 days ago. Open
Difficulty 3/5 Half a day Newbie friendliness 60/100
vaadin/browserless-test#308 · 1 comment ·
Maintainers usually reply within 1 day
All issues in vaadin/browserless-test
Similar issues
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
liberation-data/drivine4j#547 ·
Maintainers usually reply within 1 day
-
enhancement
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
-
BindingServiceProperties.bindings regressed to a non-thread-safe TreeMap in GH-3158: concurrent first use of binding names corrupts itPossibly taken @AkashB23 claimed this today. Open
Difficulty 2/5 1-3 hours Newbie friendliness 62/100
spring-cloud/spring-cloud-stream#3321 ·
Maintainers usually reply within 1 day
-
[Bug] 资源包列表 与 模组/数据包/世界 列表排列顺序不一致Possibly taken @fishdry1000 claimed this 4 days ago. Openbug
Difficulty 2/5 1-3 hours Newbie friendliness 62/100
Maintainers usually reply within 1 day
-
ai-driven-fuzzing bug claude Minor
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
linagora/twake-calendar-side-service#1333 ·
Maintainers usually reply within 1 day