Commit 3d4dd01b authored by Sylvie Ye's avatar Sylvie Ye Committed by Romain Bignon

[societegenerale] handle case of old history websiteunavailable page

* Some life insurance don't have history, return empty list
* raise BrowserUnavailable with error message
parent 86c4620c
......@@ -596,6 +596,10 @@ class OldHistoryPage(LoggedPage, HTMLPage):
assert self.doc.xpath('//div[@class="error_content"]'), 'There should have link to history page.'
return CleanText('//div[@class="error_content"]//span[@class="error_msg"]')(self.doc)
def get_error_msg(self):
assert self.doc.xpath('//div[@class="error_content"]'), 'There should have link to history page.'
return CleanText('//div[@class="error_content"]//span[@class="error_msg"]')(self.doc)
class LifeInsurance(LoggedPage, HTMLPage):
def on_load(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