From 7b2f9039d4ad697763438db888b32ead54a96bdc Mon Sep 17 00:00:00 2001 From: Florent Date: Tue, 12 Mar 2013 16:15:53 +0100 Subject: [PATCH] Fix transfer, and real test on empty list --- modules/ing/pages/transfer.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/modules/ing/pages/transfer.py b/modules/ing/pages/transfer.py index 073a3e39..caa57516 100644 --- a/modules/ing/pages/transfer.py +++ b/modules/ing/pages/transfer.py @@ -64,9 +64,10 @@ class TransferPage(BasePage): def ischecked(self, account): id = account.id # remove prefix (CC-, LA-, ...) - id = id[3:] + if "-" in id: + id = id.split('-')[1] option = self.document.xpath('//input[@value="%s"]' % id) - if len(option) < 0: + if len(option) == 0: raise AccountNotFound() else: option = option[0]