Hi i am new to Automation testing and got stuck with the clicking the button with same class name.I want to click the specific button when all the classes and id are same for all the section.
<div class="race-category-block">
<div class="info-block race-detail-block">
<a href="organizer-view-race?race=38"><div class="about-race">
<p class="race-name">Vsd</p>
<div class="date-location has-v-line-group">
<span class="has-v-line">28-01-2020 </span>
<span class="has-v-line no-v-line">Chennai</span>
<span style="display:none" id="raceDirectorName">Raajesh</span>
</div>
</div>
</a>
<div class="race-detail-status"></div>
<div class="race-detail-button-block">
<button class="btn btn-outline add-race" data-value="38">Add a race</button>
</div>
</div>
</div>
The above section is repeated for number of times
`Here I want to click the button in the button tag "Add a race" using the text in the Vsd
. because the text will only be the unique to choose, other class and ids are used many times in the same page.