allow selecting password or strong authentication

This commit is contained in:
Kevin P 2012-11-20 18:43:18 +01:00 committed by Romain Bignon
commit 9d3cc588f2
3 changed files with 23 additions and 13 deletions

View file

@ -30,12 +30,15 @@ from weboob.tools.capabilities.bank.transactions import FrenchTransaction
__all__ = ['LoginPage', 'AccountsPage', 'TransactionsPage', 'ComingTransactionsPage']
class LoginPage(BasePage):
def login(self, login, pin):
self.browser.select_form(name='loginCoForm', nr=1)
def login(self, login, pin, strong_auth):
form_nb = 1 if strong_auth else 0
indentType = "RENFORCE" if strong_auth else "MDP"
self.browser.select_form(name='loginCoForm', nr=form_nb)
self.browser['codeUtil'] = login
self.browser['motPasse'] = pin
assert self.browser['identType'] == "RENFORCE"
assert self.browser['identType'] == indentType
self.browser.submit(nologin=True)
class AccountsPage(BasePage):