I have an html structure like:
<section aria-labelledby="123">
<h2 id="123">Title</h2>
</section>
The html section element has an implicit region accessibility role
Is there something like byRole selenide selector that would find the element by role and name?
e.g.:
byRole('region', 'Title')
Or can it be grabbed using xpath?
Selenide doesn't have built-in function for getting element by role and title, however, it can be easily done with xPath
For example, this locator would point for your section element with
rolewhere child exists with text that contains Title.or you can do it by using
filterfromStream API