Commit 49c4c7ec authored by Célande Adrien's avatar Célande Adrien Committed by Vincent A

[societegenerale] users not allowed to add recipients

When not allowed to add recipients, users recieve a message:
`Vous n'avez pas la possibilité d'accéder à cette fonction. Veuillez
prendre contact avec votre Conseiller.`
parent 129d6528
......@@ -433,6 +433,10 @@ class SocieteGenerale(LoginBrowser, StatesMixin):
return self.end_oob_recipient(recipient, **params)
if self.main_page.is_here():
assert False, 'Should not be on this page.'
......@@ -28,6 +28,7 @@ from weboob.exceptions import BrowserUnavailable, BrowserPasswordExpired, Action
from weboob.browser.pages import HTMLPage, JsonPage
from weboob.browser.filters.standard import CleanText
from weboob.browser.filters.json import Dict
from import AddRecipientBankError
from .base import BasePage
from ..captcha import Captcha, TileError
......@@ -105,6 +106,13 @@ class MainPage(BasePage, PasswordPage):
self.browser.location(self.browser.absurl('/sec/vk/authent.json'), data=data)
def handle_error(self):
error_msg = CleanText('//span[@class="error_msg"]')(self.doc)
if error_msg:
# WARNING: this error occured during a recipient adding
# I don't know if it can happen at another time
raise AddRecipientBankError(message=error_msg)
class LoginPage(JsonPage):
def get_error(self):
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