title: RSelenium - selecting parent element with xpath
body: <p>I'm trying to capture a csv available on a webpage via a button using RSelenium.  The relevant html is:</p>
  
  <pre><code>&lt;a ng-click='download()'&gt;&lt;i class='csv-download'&gt;&lt;/i&gt; Download&lt;/a&gt;
  </code></pre>
  
  <p>I can select the <code>i</code> element via it's class with:</p>
  
  <pre><code>remDr$findElement(using = 'css selector', ".csv-download")
  </code></pre>
  
  <p>I think to automate a button push I need to select the parent <code>a</code> element, but can't figure out how to do this.  <code>xpath</code> seems the best way:</p>
  
  <pre><code>remDr$findElement(using = 'xpath', "//i[@class='csv-download']/parent::*")
  Error:   Summary: NoSuchElement
       Detail: An element could not be located on the page using the given search parameters.
       class: org.openqa.selenium.NoSuchElementException
  </code></pre>
  
  <p>Must be something wrong with the xpath formula.  Grateful for assistance.</p>