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):
|
def get_list(self):
|
||||||
l = []
|
l = []
|
||||||
for tr in self.document.getiterator('tr'):
|
for tr in self.document.xpath('//table[@class="tableCompte"]//tr[not(@class)]'):
|
||||||
if not 'class' in tr.attrib and tr.find('td') is not None and tr.find('td').attrib.get('class', '') == 'typeTitulaire':
|
if tr.find('td') is not None and tr.find('td').attrib.get('class', '') == 'typeTitulaire':
|
||||||
account = Account()
|
account = Account()
|
||||||
account.id = tr.xpath('.//td[@class="libelleCompte"]/input')[0].attrib['id'][len('libelleCompte'):]
|
account.id = tr.xpath('.//td[@class="libelleCompte"]/input')[0].attrib['id'][len('libelleCompte'):]
|
||||||
account.link_id = account.id
|
account.link_id = account.id
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue