fix navigation in card accounts history
This commit is contained in:
parent
8dbcbf2daa
commit
e199624d66
1 changed files with 8 additions and 1 deletions
|
|
@ -280,13 +280,20 @@ class IndexPage(BasePage):
|
||||||
i += 1
|
i += 1
|
||||||
|
|
||||||
def go_next(self):
|
def go_next(self):
|
||||||
|
# <a id="MM_HISTORIQUE_CB_lnkSuivante" class="next" href="javascript:WebForm_DoPostBackWithOptions(new WebForm_PostBackOptions("MM$HISTORIQUE_CB$lnkSuivante", "", true, "", "", false, true))">Suivant<span class="arrow">></span></a>
|
||||||
|
|
||||||
link = self.document.xpath('//a[contains(@id, "lnkSuivante")]')
|
link = self.document.xpath('//a[contains(@id, "lnkSuivante")]')
|
||||||
if len(link) == 0 or 'disabled' in link[0].attrib:
|
if len(link) == 0 or 'disabled' in link[0].attrib:
|
||||||
return False
|
return False
|
||||||
|
|
||||||
|
account_type = 'COMPTE'
|
||||||
|
m = re.search('HISTORIQUE_(\w+)', link[0].attrib['href'])
|
||||||
|
if m:
|
||||||
|
account_type = m.group(1)
|
||||||
|
|
||||||
self.browser.select_form(name='main')
|
self.browser.select_form(name='main')
|
||||||
self.browser.set_all_readonly(False)
|
self.browser.set_all_readonly(False)
|
||||||
self.browser['__EVENTTARGET'] = 'MM$HISTORIQUE_COMPTE$lnkSuivante'
|
self.browser['__EVENTTARGET'] = 'MM$HISTORIQUE_%s$lnkSuivante' % account_type
|
||||||
self.browser['__EVENTARGUMENT'] = ''
|
self.browser['__EVENTARGUMENT'] = ''
|
||||||
try:
|
try:
|
||||||
self.browser['MM$m_CH$IsMsgInit'] = 'N'
|
self.browser['MM$m_CH$IsMsgInit'] = 'N'
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue