Target a button to click with class name instead of link

I am trying to click this button, but it changes colour and the link text changes depending on what stylesheet and language I load (hence selecting it with link or visual doesn’t work)

Here’s the code:

<a href="javascript:document.BookingExtrasForm.action=driverFlightDetailsURL;
  	class="carResultRow_OfferInfo-btn-primary" onclick="trackBookNow();">
                    <span class="a11y-vh">Hyundai i30&nbsp;o simile , </span>
                    <span>Seleziona</span>
                            <div class="book-loader"></div>
                    </a>

Can anyone recommend a good way to do this?

Maybe this helps: How to click a button with a changing ID (partial ID match)?

Hi Ulrich!

Thanks for the suggestion! I wasn’t certain how to apply it to my situation, but tried the following and it worked!
//*[contains(@class, ‘carResultRow_OfferInfo-btn-primary’)]

Thank you!

You’re using single quotation marks (U+2019) instead of the straight apostrophe '. The former doesn’t appear to work.

As a beginner I started with your target example.

Did the forum software or your clipboard manager convert the character?