Some browser2 features in transfer pages

This commit is contained in:
Florent 2014-04-01 12:36:07 +02:00
commit af570a856f
2 changed files with 22 additions and 39 deletions

View file

@ -19,7 +19,7 @@
import hashlib
from weboob.tools.browser2 import LoginBrowser, URL, need_login
from weboob.tools.browser import BrowserIncorrectPassword
from weboob.tools.browser import BrowserIncorrectPassword, BrokenPageError
from weboob.capabilities.bank import Account, TransferError
from .pages import AccountsList, LoginPage, TitrePage, TitreHistory,\
@ -173,6 +173,9 @@ class IngBrowser(LoginBrowser):
else:
self.page.confirm(self.password)
self.valtransferpage.go()
recap = self.page.recap()
if len(list(recap)) == 0:
raise BrokenPageError('Unable to find confirmation')
return self.page.recap()
else:
raise TransferError('Recipient not found')