save and load state of browser into storage

This commit is contained in:
Romain Bignon 2015-02-21 14:21:54 +01:00
commit cedfb5670e
4 changed files with 61 additions and 5 deletions

View file

@ -45,7 +45,9 @@ class CreditMutuelBrowser(LoginBrowser):
PROFILE = Wget()
BASEURL = 'https://www.creditmutuel.fr'
login = URL('/groupe/fr/index.html', LoginPage)
login = URL('/groupe/fr/index.html',
'/(?P<subbank>.*)/fr/banques/accueil.html',
LoginPage)
login_error = URL('/(?P<subbank>.*)/fr/identification/default.cgi', LoginErrorPage)
accounts = URL('/(?P<subbank>.*)/fr/banque/situation_financiere.cgi', AccountsPage)
user_space = URL('/(?P<subbank>.*)/fr/banque/espace_personnel.aspx', UserSpacePage)
@ -70,6 +72,8 @@ class CreditMutuelBrowser(LoginBrowser):
currentSubBank = None
__states__ = ['currentSubBank']
def do_login(self):
self.login.stay_or_go()