Commit 0f35db7b authored by Sylvie Ye's avatar Sylvie Ye Committed by Romain Bignon

[societegenerale] raise NoAccountsException when there is no account message

parent a77b9c5e
......@@ -162,6 +162,7 @@ class SocieteGenerale(LoginBrowser, StatesMixin):
def get_accounts_list(self):
# go on new_website
......@@ -36,7 +36,7 @@ from weboob.browser.filters.standard import (
from weboob.browser.filters.html import Link, TableCell
from weboob.browser.pages import HTMLPage, XMLPage, JsonPage, LoggedPage, pagination
from weboob.exceptions import BrowserUnavailable, ActionNeeded
from weboob.exceptions import BrowserUnavailable, ActionNeeded, NoAccountsException
def MyDecimal(*args, **kwargs):
......@@ -72,6 +72,11 @@ class AccountsMainPage(LoggedPage, HTMLPage):
def is_old_website(self):
return Link('//a[contains(text(), "Afficher la nouvelle consultation")]', default=None)(self.doc)
def is_accounts(self):
error_msg = CleanText('//span[@class="error_msg"]')(self.doc)
if 'Vous ne disposez pas de compte consultable' in error_msg:
raise NoAccountsException(error_msg)
class AccountDetailsPage(LoggedPage, HTMLPage):
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