From 6df0d50f9d6e0b7cab33bf0a9bf1e138ee935db6 Mon Sep 17 00:00:00 2001 From: Christophe Francois Date: Wed, 4 Nov 2020 14:16:45 +0100 Subject: [PATCH] [sogecartenet] Fix header index in iter_accounts & iter_history There is now an empty line at the start of the xls documents, so we need to shift the header row by 1. --- modules/sogecartenet/ent_pages.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/modules/sogecartenet/ent_pages.py b/modules/sogecartenet/ent_pages.py index 25dd1297a5..a58119ab3d 100644 --- a/modules/sogecartenet/ent_pages.py +++ b/modules/sogecartenet/ent_pages.py @@ -119,6 +119,8 @@ def build_doc(self, content): class AccountsXlsPage(LoggedPage, XLSPage): + HEADER = 2 # the first row is empty, the second contains headers + @method class iter_accounts(DictElement): class item(ItemElement): @@ -285,9 +287,8 @@ def select_account(self, account): self.browser.wait_xpath_visible('//p[contains(@class, "Notification-description")][contains(text(), "a bien été sélectionnée")]') - class HistoryXlsPage(LoggedPage, XLSPage): - HEADER = 4 + HEADER = 5 @method class iter_history(DictElement): -- GitLab