I'd appreciate any help on this issue.
I'm trying to click (to expand) all years and months elements on this page:
<tbody ng-repeat="year">
<tr class="year expandable title">
<th colspan="6"><a>2020</a></th>
</tr>
<tr class="month expandable title ng-hide" data-month="1606780800000">
<th scope="rowgroup" colspan="6">
<a>
<fin-date format="MMMM YYYY"><span class="display">December 2020</span></fin-date>
</a>
</th>
</tr>
<!-- [...] ALL OTHER MONTHS -->
<tr class="month expandable title ng-hide last" data-month="1577836800000">
<th scope="rowgroup" colspan="6">
<a>
<fin-date format="MMMM YYYY"><span class="display">January 2020</span></fin-date>
</a>
</th>
</tr>
</tbody>
<tbody ng-repeat="year" class="last">
<tr class="year expandable title last" aria-expanded="false">
<th colspan="6"><a>2019</a></th>
</tr>
<tr class="month expandable title ng-hide" data-month="1575158400000">
<th scope="rowgroup" colspan="6">
<a>
<fin-date format="MMMM YYYY"><span class="display">December 2019</span></fin-date>
</a>
</th>
</tr>
<tr class="month expandable title ng-hide last" data-month="1572566400000">
<th scope="rowgroup" colspan="6">
<a>
<fin-date format="MMMM YYYY"><span class="display">November 2019</span></fin-date>
</a>
</th>
</tr>
</tbody>
When trying this code below I always get a Lookup error.
for y in find_all(S('.year.expandable')):
click(y)
for m in find_all(S('.month.expandable')):
click(m)
Not sure why but it works If I click on just one element click(S('.year.expandable'))
Any idea what could be wrong?
Aucun commentaire:
Enregistrer un commentaire