Commit b6c57554 authored by Guillaume Risbourg's avatar Guillaume Risbourg Committed by ntome

[fortuneo] Add last name+title to CapProfile

Adding last name and title of the person to the profile.
The first name isn't available in the person's details.
parent 75232d92
......@@ -290,4 +290,11 @@ class Fortuneo(LoginBrowser, StatesMixin):
csv_link = self.page.get_csv_link()
if csv_link:
self.location(csv_link)
return self.page.get_profile()
return self.page.get_profile()
# The persons name is in a menu not returned in the ProfilePage, so
# we have to go back to the AccountsPage (which is the main page for the website)
# to get the info
person = self.page.get_profile()
self.accounts_page.go()
self.page.fill_person_name(obj=person)
return person
......@@ -365,6 +365,14 @@ class AccountsList(LoggedPage, HTMLPage):
if warning:
raise ActionNeeded(warning[0].text)
@method
class fill_person_name(ItemElement):
klass = Account
# Contains the title (M., Mme., etc) + last name.
# The first name isn't available in the person's details.
obj_name = CleanText('//span[has-class("mon_espace_nom")]')
def get_iframe_url(self):
iframe = self.doc.xpath('//iframe[@id="iframe_centrale"]')
if iframe:
......
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