Set-up:
I'm using Python + Selenium to do some work.
I have a table with the following html,
<tbody>
<tr bgcolor="white" class="TRNORM TRCOLHEADER">...</tr>
<tr bgcolor="white" class="TRNORM cROW">...</tr>
<tr bgcolor="white" class="TRNORM cROW">...</tr>
<tr bgcolor="white" class="TRNORM">...</tr>
<tr bgcolor="white" class="TRNORM">...</tr>
</tbody>
and I loop over the rows using the following code,
table = browser.find_element_by_css_selector('#formWrapper > tbody > tr:nth-child(3) > td > table > tbody')
for row in table.find_elements_by_xpath('tr'):
# code for row follows
Issue
I need to loop over class="TRNORM cROW"
only.
How do I do this?