Excess inner html of all elements with a class using python selenium
<p>I am trying to fetch a html field from all the elements returned by <code>find_elements_by_class_name</code> method. I fetched all the elements with a given class-name from a webpage using the above method and stored the list in a variable, like:</p>

<pre><code>rows = self.driver.find_elements_by_css_selector('.order-row')
</code></pre>

<p>Now i am trying to iterate on <code>rows</code> list and print a <code>strong</code> field's inner html. Like:</p>

<pre><code>for row in rows:
    print row.find_element_by_xpath('//td[3]/a/strong').get_attribute('innerHTML')
</code></pre>

<p>but every time it prints the value from first row for all the rows.</p>

<p>This is the xpath of the element from first data row of table where tr[4] is the first row with data:</p>

<pre><code>//*[@id="myo-table"]/table/tbody/tr[4]/td[3]/a/strong
</code></pre>

<p>Expected output:</p>

<pre><code>value 1
value 2
value 3
value 4
....
</code></pre>

<p>Current Output :</p>

<pre><code>value 1
value 1
value 1
value 1
....
</code></pre>