title: How to select date from drop down menu using selenium webdriver?
body: <p>I have a date picker where I can select a date range like 3months, 7 days or this year.
  How can I select "This year" from a drop down menu?</p>
  
  <p>Here is the code:</p>
  
  <pre><code> &lt;div class="full"&gt;
     &lt;div class="range-preset"&gt;
      &lt;div class="date-range-selector"&gt;
      &lt;label&gt;Date Range:&lt;/label&gt;
      &lt;select class="full" style="width:230px; "&gt;
      &lt;option value="custom"&gt;Custom&lt;/option&gt;
      &lt;option value="yesterday"&gt;Yesterday&lt;/option&gt;
      &lt;option value="7days"&gt;7 Days&lt;/option&gt;
      &lt;option value="30days"&gt;30 Days&lt;/option&gt;
      &lt;option value="90days"&gt;90 Days&lt;/option&gt;
      &lt;option value="this_month"&gt;This Month&lt;/option&gt;
      &lt;option value="last_month"&gt;Last Month&lt;/option&gt;
      &lt;option value="two_months_ago"&gt;Two Months Ago&lt;/option&gt;
      &lt;option value="this_year"&gt;This Year&lt;/option&gt;
      &lt;option value="yesterday"&gt;Yesterday&lt;/option&gt;
      &lt;/select&gt;
     &lt;/div&gt;
    &lt;/div&gt;
  </code></pre>
  
  <p>I tried this:</p>
  
  <pre><code>driver.findElement(By.className("full.option.this_year")).click();
  </code></pre>
  
  <p>Any help please, thank you</p>