Commit e188452b authored by Jerome Berthier's avatar Jerome Berthier Committed by Romain Bignon

[banquepopulaire] Add support for BrowserIncorrectPassword when there is a Virtual Keyboard

According to the Banque Populaire Occitane IVR (05 81 22 00 00), users
must change their passwords to continue to use the service.
parent 71aae280
......@@ -31,7 +31,7 @@ from weboob.browser.elements import method, DictElement, ItemElement
from weboob.browser.filters.standard import CleanText, CleanDecimal, Regexp, Eval, Date, Field
from weboob.browser.filters.html import Attr, Link, AttributeNotFound
from weboob.browser.filters.json import Dict
from weboob.exceptions import BrowserUnavailable, BrowserIncorrectPassword, ActionNeeded
from weboob.exceptions import BrowserUnavailable, BrowserIncorrectPassword, ActionNeeded, BrowserPasswordExpired
from weboob.browser.pages import HTMLPage, LoggedPage, FormNotFound, JsonPage, RawPage, XMLPage
......@@ -386,8 +386,12 @@ class Login2Page(LoginPage):
form_id = (k, v[0]['id'], v[0]['type'])
if v[0].get('virtualKeyboard'):
if not password.isdigit():
# Users who get virtualkeyboard must change their passwords
# If there are letters in the password it means they did not do it.
raise BrowserPasswordExpired()
password = self.virtualkeyboard(vk_obj=v[0]['virtualKeyboard'],
password=password)
password=password)
payload = {
'validate': {
......
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