'I have a wbpage where everytime based on start and end date the textboxes increase and decrease I am not getting proper row count and txtbox coun

This is the code iam using to count number of rows, it is returning only 1:
tablen = driver.find_elements(By.XPATH, '//*[@id="m_mc_s0_z0_C_ctl00_tblForecast"]/tbody/tr')
tblength = len(tablen) print(tblength)
Result : it is printing output as 1, but their are many rows

<table id="m_mc_s0_z0_C_ctl00_tblForecast">
                                    <tbody><tr>
                                        <td class="separatorLabel" colspan="15">Quarter 4 2021</td>
                                    </tr><tr>
                                        <td align="right" style="width:180px;">2021 November</td><td class="nonrequiredblock"></td><td class="ctl" style="width:160px;"><span id="m_mc_s0_z0_C_ctl00_c202111_wrapper" class="riSingle RadInput RadInput_Silk" style="width:80px;"><input id="m_mc_s0_z0_C_ctl00_c202111" name="m$mc$s0$z0$C$ctl00$c202111" class="riTextBox riEnabled" value="0.00" type="text"><input id="m_mc_s0_z0_C_ctl00_c202111_ClientState" name="m_mc_s0_z0_C_ctl00_c202111_ClientState" type="hidden" autocomplete="off" value="{&quot;enabled&quot;:true,&quot;emptyMessage&quot;:&quot;&quot;,&quot;validationText&quot;:&quot;0&quot;,&quot;valueAsString&quot;:&quot;0&quot;,&quot;minValue&quot;:0,&quot;maxValue&quot;:70368744177664,&quot;lastSetTextBoxValue&quot;:&quot;0.00&quot;}"></span></td><td align="right" style="width:180px;">2021 December</td><td class="nonrequiredblock"></td><td class="ctl" style="width:160px;"><span id="m_mc_s0_z0_C_ctl00_c202112_wrapper" class="riSingle RadInput RadInput_Silk" style="width:80px;"><input id="m_mc_s0_z0_C_ctl00_c202112" name="m$mc$s0$z0$C$ctl00$c202112" class="riTextBox riEnabled" value="0.00" type="text"><input id="m_mc_s0_z0_C_ctl00_c202112_ClientState" name="m_mc_s0_z0_C_ctl00_c202112_ClientState" type="hidden" autocomplete="off" value="{&quot;enabled&quot;:true,&quot;emptyMessage&quot;:&quot;&quot;,&quot;validationText&quot;:&quot;0&quot;,&quot;valueAsString&quot;:&quot;0&quot;,&quot;minValue&quot;:0,&quot;maxValue&quot;:70368744177664,&quot;lastSetTextBoxValue&quot;:&quot;0.00&quot;}"></span></td>
                                    </tr><tr>
                                        <td class="separatorLabel" colspan="15">Quarter 1 2022</td>
                                    </tr><tr>
                                        <td align="right" style="width:180px;">2022 January</td><td class="nonrequiredblock"></td><td class="ctl" style="width:160px;"><span id="m_mc_s0_z0_C_ctl00_c202201_wrapper" class="riSingle RadInput RadInput_Silk" style="width:80px;"><input id="m_mc_s0_z0_C_ctl00_c202201" name="m$mc$s0$z0$C$ctl00$c202201" class="riTextBox riEnabled" value="0.00" type="text"><input id="m_mc_s0_z0_C_ctl00_c202201_ClientState" name="m_mc_s0_z0_C_ctl00_c202201_ClientState" type="hidden" autocomplete="off" value="{&quot;enabled&quot;:true,&quot;emptyMessage&quot;:&quot;&quot;,&quot;validationText&quot;:&quot;0&quot;,&quot;valueAsString&quot;:&quot;0&quot;,&quot;minValue&quot;:0,&quot;maxValue&quot;:70368744177664,&quot;lastSetTextBoxValue&quot;:&quot;0.00&quot;}"></span></td><td align="right" style="width:180px;">2022 February</td><td class="nonrequiredblock"></td><td class="ctl" style="width:160px;"><span id="m_mc_s0_z0_C_ctl00_c202202_wrapper" class="riSingle RadInput RadInput_Silk" style="width:80px;"><input id="m_mc_s0_z0_C_ctl00_c202202" name="m$mc$s0$z0$C$ctl00$c202202" class="riTextBox riEnabled" value="0.00" type="text"><input id="m_mc_s0_z0_C_ctl00_c202202_ClientState" name="m_mc_s0_z0_C_ctl00_c202202_ClientState" type="hidden" autocomplete="off" value="{&quot;enabled&quot;:true,&quot;emptyMessage&quot;:&quot;&quot;,&quot;validationText&quot;:&quot;0&quot;,&quot;valueAsString&quot;:&quot;0&quot;,&quot;minValue&quot;:0,&quot;maxValue&quot;:70368744177664,&quot;lastSetTextBoxValue&quot;:&quot;0.00&quot;}"></span></td>
                                    </tr>
                                </tbody></table>


Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source