title: How to usethe upload button in YouTube using Selenium WebDriver C#
body: <p>I am trying to make a YouTube video uploader to upload a video with a single click. So far I am managing to get to the <code>http://www.youtube.com/upload</code> page, but I can not find a way to use the button to upload my video. </p>
  
  <p>After a little research I have found out that the proper way to upload a file is <code>uploadVid.SendKeys("C:\\video.flv");</code>. So far I am at this point:</p>
  
  <pre><code>    //  IWebElement uploadVid = driver.FindElement(By.Id("start-upload-button-single"));
     //   IWebElement uploadVid = driver.FindElement(By.XPath("//*[@id=\"upload-prompt-box\"]/div[1]"));
    //    IWebElement uploadVid = driver.FindElement(By.XPath("//*[@id=\"start-upload-button-single\"]"));
          IWebElement uploadVid = driver.FindElement(By.ClassName("upload-drag-drop-description"));
          uploadVid.SendKeys("C:\\video.flv"); 
  </code></pre>
  
  <p>The lines I have commented out are what I have tried so far without any success. I keep getting error <code>element not found</code> . </p>
  
  <p>I use C# Selenium WebDriver in VS2013, WPF.</p>