Commit 03f98a17 authored by Sylvie Ye's avatar Sylvie Ye Committed by Vincent A

[banquepopulaire] add condition to retrieve IBAN or not

don't go on IBAN details page if the current page is not the IBAN page
parent 0846a05c
......@@ -1002,7 +1002,12 @@ class IbanPage(LoggedPage, MyHTMLPage):
def go_iban(self, account):
for tr in self.doc.xpath('//table[@id]/tbody/tr'):
if account.type not in (Account.TYPE_LOAN, Account.TYPE_MARKET) and CleanText().filter(tr.xpath('./td[1]')) in account.id:
conditions = (
account.type not in (Account.TYPE_LOAN, Account.TYPE_MARKET),
CleanText().filter(tr.xpath('./td[1]')) in account.id,
self.doc.xpath('//div[contains(text(), "Impression IBAN/RIB")]'),
)
if all(conditions):
form = self.get_form(id='myForm')
form['token'] = self.build_token(form['token'])
form['dialogActionPerformed'] = "DETAIL_IBAN_RIB"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment