title: selenium chrome scrape tagname value c#
body: <p>Im trying to scrape value of a tagname which is repeated but i need to scrape one of them. the problem is in my case both td are printed in my datagridview 
   with Name in this situation (Ayoub Zahir)
  also, <a href="/mobile/messenger/contacts/ajax/display/?contact_id=2174360766132140">+**********10</a>
  i need only the tagname td with (ayoub zahir) to be printed.
  here is how it looks like</p>
  
  <pre><code>&lt;div class="_4-u3"&gt;
  &lt;table class="_4-ss"&gt;
  &lt;thead&gt;
  &lt;tr&gt;
  &lt;th&gt;Contact Name&lt;/th&gt;
  &lt;th&gt;Phone Number(s) or Email(s)&lt;/th&gt;
  &lt;/tr&gt;&lt;/thead&gt;
  &lt;tbody&gt;
  &lt;tr&gt;
  &lt;td&gt;Ayoub Zahir&lt;/td&gt;
  &lt;td&gt;&lt;a href="/mobile/messenger/contacts/ajax/display/?contact_id=2174360766132140" rel="async-post"&gt;+**********10&lt;/a&gt;&lt;/td&gt;
  &lt;/tr&gt;
  &lt;tr&gt;
  &lt;td&gt;Mohamed Zahir&lt;/td&gt;
  &lt;td&gt;&lt;a href="/mobile/messenger/contacts/ajax/display/?contact_id=2174360442798839" rel="async-post"&gt;+**********97&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;
  </code></pre>
  
  <p>and here is my code : </p>
  
  <pre><code>var table = selenium1.driver().FindElement(By.TagName("tbody"));
          var rows = table.FindElements(By.TagName("tr"));
  
          foreach (var name in rows)
          {
              var rowTds = name.FindElements(By.TagName("td"));
  
              foreach (var td in rowTds)
              {
                  this.Invoke(new MethodInvoker(delegate ()
                  {
  
                      dataGridView1.Rows.Add(td.Text);
                  }));
              }
  
          }
  </code></pre>
  
  <p>result always both td. 
  thanks in advance.</p>