I would like to get the text of a cell in a table of a html with python and selenium, but I get this error:
Message: no such element: Unable to locate element: {"method":"name","selector":"ctl00_ContentPlaceHolder1_ctl02_tblHistorico"}
The html:
<div id="ctl00_ContentPlaceHolder1_ctl02_divTabelaHistorico">
<br />
<table id="ctl00_ContentPlaceHolder1_ctl02_tblHistorico" class="tablefq" width="100%" border="0" cellspacing="1" cellpadding="0">
<tr>
<td id="ctl00_ContentPlaceHolder1_ctl02_tdTitulo" class="tituloTV" height="20" colspan="6">XX</td>
</tr>
<tr>
<td class="TDTVHeader" width="4%"><a id='aSinalMain' class='sinal hand' onclick='aSinalMain_onClick(this)'>[+]</a></td>
<td class="TDTVHeader" colspan="1">XXXnbsp;</td>
<td class="TDTVHeader" colspan="1">XXXbsp;</td>
<td class="TDTVHeader" colspan="1">XXXsp;</td>
<td class="TDTVHeader" colspan="1">XXX</td>
<td class="TDTVHeader" colspan="1">XXX </td>
</tr>
<tr>
<td class="TDFQ" colspan="1"><a id='aSinal' class='sinal hand'>[+]</a></td>
<td class="TDFQ" colspan="1">XXX</td>
<td class="TDFQ" colspan="1">XXX</td>
<td class="TDFQ" colspan="1">XX</td>
<td class="TDFQ" colspan="1">XX</td>
<td class="TDFQ" colspan="1">XX</td>
</tr>
<tr style="display:none;">
<td class="TDFQ historico" colspan="6"><div class=scroll>I WANT HERE HERE HERE</div></td>
</tr>
<tr>
<td class="TDFQ" colspan="1"><a id='aSinal' class='sinal hand'>[+]</a></td>
<td class="TDFQ" colspan="1">XXXp;</td>
<td class="TDFQ" colspan="1">XXX </td>
<td class="TDFQ" colspan="1">XXXT;</td>
<td class="TDFQ" colspan="1">XXX</td>
<td class="TDFQ" colspan="1">XXX </td>
</tr>
</table>
</div>
Python code:
text = driver.find_element_by_name('ctl00_ContentPlaceHolder1_ctl02_tblHistorico')