Commit 03f98a17 authored by Sylvie Ye's avatar Sylvie Ye Committed by hydrargyrum
Browse files

[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 @@ def need_to_go(self):
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
conditions = (
account.type not in (Account.TYPE_LOAN, Account.TYPE_MARKET),
CleanText().filter(tr.xpath('./td[1]')) in,
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