Fix account list: get all accounts
There is also more logic in the xpath query, which I find more readable.
This commit is contained in:
parent
4e86d14e12
commit
6544bbfcdc
1 changed files with 2 additions and 2 deletions
|
|
@ -34,8 +34,8 @@ class AccountsList(BasePage):
|
|||
|
||||
def get_list(self):
|
||||
l = []
|
||||
for tr in self.document.getiterator('tr'):
|
||||
if not 'class' in tr.attrib and tr.find('td') is not None and tr.find('td').attrib.get('class', '') == 'typeTitulaire':
|
||||
for tr in self.document.xpath('//table[@class="tableCompte"]//tr[not(@class)]'):
|
||||
if tr.find('td') is not None and tr.find('td').attrib.get('class', '') == 'typeTitulaire':
|
||||
account = Account()
|
||||
account.id = tr.xpath('.//td[@class="libelleCompte"]/input')[0].attrib['id'][len('libelleCompte'):]
|
||||
account.link_id = account.id
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue