From 3514f65cc6bd05d9f3885183f5cc93fc60c8eec5 Mon Sep 17 00:00:00 2001 From: Florent Date: Fri, 28 Mar 2014 15:43:10 +0100 Subject: [PATCH] Reset the counter to each pages --- modules/ing/pages/accounts_list.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/modules/ing/pages/accounts_list.py b/modules/ing/pages/accounts_list.py index 12a4272a..9623746e 100644 --- a/modules/ing/pages/accounts_list.py +++ b/modules/ing/pages/accounts_list.py @@ -110,8 +110,9 @@ class INGCategory(Filter): class AccountsList(LoggedPage, HTMLPage): - - i = 0 + def __init__(self, browser, response, *args, **kwargs): + super(AccountsList, self).__init__(browser, response, *args, **kwargs) + self.i = 0 @method class get_list(ListElement): @@ -147,8 +148,8 @@ class AccountsList(LoggedPage, HTMLPage): def condition(self): if self.el.find('.//td[@class="date"]') is None: return False - if AccountsList.i < self.env['index']: - AccountsList.i += 1 + if self.page.i < self.env['index']: + self.page.i += 1 return False return True