title: How to click the date picker selenium VBA?
body: <p>I'd like to use selenium VBA to download some data from <a href="https://finance.yahoo.com/quote/%5EKS11/history?period1=1484018309&amp;period2=1515554309&amp;interval=1d&amp;filter=history&amp;frequency=1d/" rel="nofollow noreferrer">Yahoo Finance KOSPI COmposite Index</a>.</p>
  
  <p>I got the difficulty when click the date picker arrow to get the mini window to select the end date as today. I tried to record the marco through selenium IDE in chrome, but IDE does not record the step when I click the arrow of the Time period to get the date picker visible.</p>
  
  <p>Below is my code in VBA.</p>
  
  <pre><code>Public Function seleniumKorea(bot As WebDriver)
      Dim url As String
      url = "https://finance.yahoo.com/quote/%5EKS11/history?period1=1484018309&amp;period2=1515554309&amp;interval=1d&amp;filter=history&amp;frequency=1d"
      bot.Start "chrome", url
      bot.Get "/"
  
      'Not sure how to add date picker here        
      bot.FindElementByName("endDate").Clear
      bot.FindElementByName("endDate").SendKeys (Date)
      bot.FindElementByXPath("(.//*[normalize-space(text()) and normalize-space(.)='End Date'])[1]/following::button[1]").Click
  
      Application.Wait (Now + TimeValue("0:01:00"))
  
      bot.FindElementByXPath("(.//*[normalize-space(text()) and normalize-space(.)='As of'])[1]/following::div[4]").Click
      Application.Wait (Now + TimeValue("0:01:00"))
      bot.FindElementByXPath("(.//*[normalize-space(text()) and normalize-space(.)='Currency in KRW'])[1]/following::span[2]").Click
  
      Application.Wait (Now + TimeValue("0:01:00"))
  End Function    
  </code></pre>
  
  <p>I tried to use the ByXPath to get the svg class but failed.</p>
  
  <p>Thanks in advance.</p>