From 31f206e697bebbd85d17dd8e0f85bce8020e83e7 Mon Sep 17 00:00:00 2001 From: Florent Date: Thu, 19 Mar 2015 22:29:54 +0100 Subject: [PATCH] Fix low balance listing When the balance is low, the span class is "low-balance" and not balance. Use 'contain' to be more robust --- modules/poivy/pages.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/poivy/pages.py b/modules/poivy/pages.py index 0a3aaf77..44c03b19 100644 --- a/modules/poivy/pages.py +++ b/modules/poivy/pages.py @@ -57,7 +57,7 @@ class HomePage(LoggedPage, HTMLPage): klass = Subscription obj_id = CleanText('//span[@class="welcome-text"]/b') - obj__balance = CleanDecimal(CleanText('//span[@class="balance"]'), replace_dots=False) + obj__balance = CleanDecimal(CleanText('//span[contains(@class, "balance")]'), replace_dots=False) obj_label = Format(u"Poivy - %s - %s €", Field('id'), Field('_balance'))