title: Iterate through table row images and click on hyperlink
body: <p>I have a table with multiple rows ( <code>tr</code>) that contains multiple cells ( <code>td</code> )</p>
  
  <p>one of the cells contains an image hyperlink</p>
  
  <p>I would link to iterate through the table rows and click on every cell containing the image of each row, using selenium.</p>
  
  <p>for example, this is one of my tables:</p>
  
  <pre><code>&lt;table class="thetable" cellspacing="1" &gt;
  
          &lt;thead&gt;&lt;/thead&gt;
          &lt;tbody&gt;
  
             &lt;tr class="visibleRow"&gt;
  
  
                 &lt;td class="Item"&gt;&lt;/td&gt;
                 &lt;td class="modified" style="color: gray;"&gt;&lt;/td&gt;
                 &lt;td class="imageHyperlink"&gt;
                    &lt;a href="#" role="button" title="Edit the item"&gt;
                         &lt;img src="web/service/editRow.gif" /&gt;
  
                    &lt;/a&gt;
                  &lt;/td&gt;
              &lt;/tr&gt;
  
              &lt;tr class="visibleRow"&gt;&lt;/tr&gt;
  
              &lt;tr class="anotherow" style="display: none;"&gt;&lt;/tr&gt;
  
              &lt;tr class="visibleRow"&gt;&lt;/tr&gt;
  
              &lt;tr class="editorRow" style="display: none;"&gt;&lt;/tr&gt;
          &lt;/tbody&gt;
  &lt;/table&gt;
  </code></pre>
  
  <p>the only rows that I want to iterate through are the ones containing the class name <code>visibleRow</code>, and the only cells that need to be clicked on are the cells containing the class name <code>imageHyperlink</code></p>
  
  <p>I implemented a for loop that iterate through the rows with class visibleRow, store the cell class name inside cell variable. and click on the cell:</p>
  
  <pre><code>for row in driver.find_elements_by_css_selector("tr.visibleRow"):
      cell = row.find_elements_by_class_name("imageHyperlink")
      cell.click()
  </code></pre>
  
  <p>However I am getting this error as it seems the cell is not the clickable item:</p>
  
  <blockquote>
    <p>AttributeError: 'list' object has no attribute 'click'</p>
  </blockquote>
  
  <p>How can I fix this ?</p>