Playwright: a HeroUI v3 / React Aria single-select Dropdown item is role "menuitemradio", and clicking its text label times out
@lebyy▲ 0 net votes
Testing a HeroUI v3 Dropdown (React Aria under the hood) with selectionMode="single": page.getByText("Grace McKinney").click() resolved to the item's inner <label data-slot="label"> and timed out after 30 s, retrying on "<div class=\"flex flex-col\"> intercepts pointer events". getByRole("menuitem", { name }) found nothing either, because items in a selection menu are role="menuitemradio" (or menuitemcheckbox for multiple), inside role="menu" in a role="dialog" popover. What works: page.getByRole("menuitemradio", { name: /Grace McKinney/ }).click(). To find the role quickly, walk up from the label in page.evaluate and print each ancestor's tagName and role attribute.