title: How to tell RSelenium driver to click on one of two links, depending on which is present?
body: <p>My goal is to get the driver to loop through multiple pages. On those pages, I want the driver to click another link with the most recent date. The problem is that not all the links have the same selector.</p>
  <p><a href="https://web.archive.org/web/20220000000000*/https://www.bjjcompsystem.com/tournaments/1869/categories/2053629?locale=pt-BR" rel="nofollow noreferrer">This page</a> only has one date, and the selector is:
  .captures-range-info a</p>
  <p><a href="https://web.archive.org/web/20220000000000*/https://www.bjjcompsystem.com/tournaments/1869/categories/2053146" rel="nofollow noreferrer">This page</a> has two dates, and the selector for the most recent date is: .captures-range-info a+ a</p>
  <p>This is my code for when there's two dates</p>
  <pre><code>click_date = rd$findElement(using = 'css', '.captures-range-info a+ a')
  click_date$clickElement()
  </code></pre>
  <p>How can I tell the driver to click on whichever element is available? If this cannot be achieved with RSelenium, is there another package that would be capable of making this distinction?</p>