title: R - Rselenium - navigate drop down menu / list / box using = 'id'
body: <p>How can I navigate a dynamic drop down list via " using = 'id' "     (e.g., <code>remDr$findElement(using='id', value="main_ddYear")</code> ?</p>
  
  <p>I can find and click using <code>findElement</code>.  After clicking I could send "down arrow" keys (keystrokes) and an "enter" if I know how many arrows down my targeted selection is.  </p>
  
  <p>Sample of the page source</p>
  
  <pre><code>&lt;select name="main$ddYear" onchange="javascript:setTimeout(&amp;#39;__doPostBack(\&amp;#39;main$ddYear\&amp;#39;,\&amp;#39;\&amp;#39;)&amp;#39;, 0)" id="main_ddYear" class="groupTextBox"&gt;
  &lt;option selected="selected" value="2017"&gt;2017&lt;/option&gt;
  &lt;option value="2016"&gt;2016&lt;/option&gt;
  &lt;option value="2015"&gt;2015&lt;/option&gt;
  &lt;option value="2014"&gt;2014&lt;/option&gt;
  &lt;option value="2013"&gt;2013&lt;/option&gt;
  &lt;/select&gt;
  </code></pre>
  
  <p>I would like to do something similar to the solution in <a href="https://stackoverflow.com/questions/26963927/dropdown-boxes-in-rselenium">this post</a> but with 'id' instead of 'xpath' .  I could not adapt the xpath solution.</p>
  
  <p><a href="https://stackoverflow.com/questions/7232544/selenium-webdriver-and-dropdown-boxes">Another solution</a> in Java used a "Select" class which I did not find referenced in the <a href="https://cran.r-project.org/web/packages/RSelenium/vignettes/RSelenium-basics.html#sending-text-to-elements" rel="nofollow noreferrer">quick start tutorial</a> or <a href="https://cran.r-project.org/web/packages/RSelenium/RSelenium.pdf" rel="nofollow noreferrer">documentation</a>. </p>
  
  <p>I will post a separate question about how to scrape the drop down list of options / values.</p>