title: CodedUI test does not read data from CSV input file
body: <p>I am having difficulty mapping a CSV file with the Coded UI test method. This is most likely a stupid question but I cannot seem to find a solution for my problem, at least not one that works. I have made sure to set the property of the CSV file to <strong>Copy always</strong>.
  I have also imported the CSV file by writing the following line above the test method.</p>
  
  <pre><code>[DataSource("Microsoft.VisualStudio.TestTools.DataSource.CSV", "|DataDirectory|\\Data\\login.csv", "login#csv", DataAccessMethod.Sequential), DeploymentItem("login.csv"), TestMethod]
  </code></pre>
  
  <p>The file name is <code>login.csv</code> and it resides in the <code>Data</code> folder.</p>
  
  <p>The test will compile without any problem but once the test executes the fields that should receive input from the CSV file are left empty and the execution is interrupted. I've tried replacing the data from the CSV file by using Strings and it works perfectly fine. The piece of code I am using to import each parameter is:</p>
  
  <pre><code>TestContext.DataRow["Username"].ToString()
  </code></pre>
  
  <p>Also, the CSV file contains something along the following lines:</p>
  
  <pre><code>Username,Password,Fullname
  admin@mail.com,password,Admin
  </code></pre>
  
  <p>Is there anyone who can point what it is I am forgetting.</p>
  
  <p>Update: I pinpointed the issue, it seems like the issue only revolves around the first column in the csv file. When I try to import any of the other values it works perfectly fine.</p>