title: How to iterate through web tables using selenium and ruby
body: <p>I want to iterate through an html table with n number rows and columns as follows: </p>
  
  <pre><code>&lt;table class='table'&gt;
          &lt;tbody&gt;
            &lt;tr&gt;
              &lt;td&gt;Spratly Islands&lt;/td&gt;
              &lt;td&gt;Vietnam&lt;/td&gt;
              &lt;td&gt;Azerbaijan&lt;/td&gt;
              &lt;td&gt;Georgia&lt;/td&gt;
            &lt;/tr&gt;
            &lt;tr&gt;
              &lt;td&gt;Sri Lanka&lt;/td&gt;
              &lt;td&gt;Israel&lt;/td&gt;
              &lt;td&gt;Cyprus&lt;/td&gt;
              &lt;td&gt;Yemen&lt;/td&gt;
            &lt;/tr&gt;
            &lt;tr&gt;
              &lt;td&gt;Maldives&lt;/td&gt;
              &lt;td&gt;Kuwait&lt;/td&gt;
              &lt;td&gt;West Malaysia&lt;/td&gt;
              &lt;td&gt;Nepal&lt;/td&gt;
            &lt;/tr&gt;
            ...
          &lt;/tbody&gt;
        &lt;/table&gt;
  </code></pre>
  
  <p>I want to get the column names for each row using xpath and print it. How to do this in ruby?
  Thanks,
  RV</p>