title: How to handle upload of file using Windows Upload Dialog in Selenium
body: <p>I am trying to upload an attachment using Selenium (C#). </p>
  
  <p>Upon checking the DOM of the site, I noticed that the link to attach files is using <code>object tags</code>. 
  Below is the HTML excerpt:</p>
  
  <pre><code>&lt;object id="ctl00_mainContent_rauFilessilverlight03" class="ruObject" height="22px" type="application/x-silverlight-2" data="data:application/x-silverlight-2," style="width: 100%;"&gt; 
   &lt;param value="/App/somelongjunkyparameters" name="source"/&gt; 
   &lt;param value="true" name="windowless"/&gt; &lt;param value="transparent" name="background"/&gt; 
   &lt;param value="some number" name="minRuntimeVersion"/&gt; 
   &lt;param value="PostData=anotherlongjunkyparameters,SilverlightRowId=ctl00_mainContent_rauFilessilverlight03,AsyncUploadId=ctl00_mainContent_rauFiles,MultipleSelection=Disabled,AllowedFileExtensions=,ServiceHandlerUrl=/App/Telerik.Web.UI.WebResource type=rau,MaxFileSize=0" name="InitParams"/&gt; 
   &lt;param value="true" name="autoUpgrade"/&gt; 
  &lt;/object&gt;
  </code></pre>
  
  <p>I have tried this so far:</p>
  
  <pre><code>IWebElement fileAttachTA = driver.FindElement(By.XPath("//object[@class='ruObject']"));
  fileAttachTA.Click();
  String filePath = "C:/User/My Documents/file.txt";
  </code></pre>
  
  <p>Selenium was able to find the object, but, should I switch to the Windows Upload Dialog? 
  Hoping to hear from anyone who has experience in this. </p>
  
  <p>Thanks!</p>