Commit b5ffe7be authored by Stephane Sobucki's avatar Stephane Sobucki Committed by Vincent A

[hsbc] Avoid false positive error messages

commit 8087d2f6dea023946894032a8fde7c1bac6438ce added the handling of
more error cases and a check for error messages at the `end_login()`
step to fix `FormNotFound` errors.

At this step, error messages and the message upon a succesful login are
located under the same XPath. So, we might raise false login errors.

To avoid false positives, we check whether we are logged in or not before handling
errors.
parent cd099eac
......@@ -227,7 +227,9 @@ def init_login(self):
def end_login(self):
for _ in range(3):
if self.login.is_here():
self.check_login_error()
if not self.page.logged:
# we should be logged in at this point
self.check_login_error()
self.page.useless_form()
# This wonderful website has 2 baseurl with only one difference: the 's' at the end of 'client'
......
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