Only one url for both pages, implement stateful browser
This commit is contained in:
parent
10e7194a36
commit
25cb1f2e08
1 changed files with 3 additions and 2 deletions
|
|
@ -81,7 +81,7 @@ class Ing(BaseBrowser):
|
||||||
raise BrowserIncorrectPassword()
|
raise BrowserIncorrectPassword()
|
||||||
|
|
||||||
def get_accounts_list(self):
|
def get_accounts_list(self):
|
||||||
if not self.is_on_page(AccountsList):
|
if not self.is_on_page(AccountsList) or self.where != "start":
|
||||||
self.location(self.accountspage)
|
self.location(self.accountspage)
|
||||||
self.where = "start"
|
self.where = "start"
|
||||||
return self.page.get_list()
|
return self.page.get_list()
|
||||||
|
|
@ -89,8 +89,9 @@ class Ing(BaseBrowser):
|
||||||
def get_account(self, id):
|
def get_account(self, id):
|
||||||
assert isinstance(id, basestring)
|
assert isinstance(id, basestring)
|
||||||
|
|
||||||
if not self.is_on_page(AccountsList):
|
if not self.is_on_page(AccountsList) or self.where != "start":
|
||||||
self.location(self.accountspage)
|
self.location(self.accountspage)
|
||||||
|
self.where = "start"
|
||||||
|
|
||||||
l = self.page.get_list()
|
l = self.page.get_list()
|
||||||
for a in l:
|
for a in l:
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue