playwright
playwright copied to clipboard
[Feature] .toHaveValue should consider custom combobox elements
Currently the .toHaveValue() assertion only works for native input component but I believe they should work for custom combobox elements as well. What do you think?
Example: https://w3c.github.io/aria-practices/examples/combobox/combobox-autocomplete-list.html
For your example as a workaround, you can target the State label, and it will resolve to the input's value:
expect(page.locator("label", { hasText: 'State' })).toHaveValue("foo");
Why was this issue closed?
Thank you for your involvement. This issue was closed due to limited engagement (upvotes/activity), lack of recent activity, and insufficient actionability. To maintain a manageable database, we prioritize issues based on these factors.
If you disagree with this closure, please open a new issue and reference this one. More support or clarity on its necessity may prompt a review. Your understanding and cooperation are appreciated.