title: How to select date from datepicker in selenium c#
body: <p>I have a date picker html look like the following:</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-html lang-html prettyprint-override"><code> &lt;tr&gt;
  &lt;td class="day"&gt;12&lt;/td&gt;
  &lt;td class="day"&gt;13&lt;/td&gt;
  &lt;td class="day"&gt;14&lt;/td&gt;
  &lt;td class="day"&gt;15&lt;/td&gt;
  &lt;td class="day"&gt;16&lt;/td&gt;
  &lt;td class="day"&gt;17&lt;/td&gt;
  &lt;td class="day"&gt;18&lt;/td&gt;
  &lt;/tr&gt;</code></pre>
  </div>
  </div>
  </p>
  
  <p>I need to select any date from a date picker using selenium c#</p>
  
  <p>I try to do it as this code but it fail</p>
  
  <pre><code>         IWebElement table = driver.FindElement(By.XPath("//*[@id='sandbox-
                   container1']/div/input"));
  
          table.Click();
  
          IWebElement el = driver.FindElement(By.XPath("/html/body/div[3]/div[1]"));
  
          List&lt;IWebElement&gt; rowEl = new List&lt;IWebElement&gt;(el.FindElements(By.TagName("tr")));
  
          List&lt;IWebElement&gt; colEl = new List&lt;IWebElement&gt;(el.FindElements(By.TagName("td")));
  
                  foreach (IWebElement cols in colEl)
                         {
                        if (cols.Text.Equals("5"))          
              cols.Click();}
  </code></pre>