Commit 20a629c0 authored by Maxime Gasselin's avatar Maxime Gasselin Committed by Romain Bignon

[creditmutuel] fix old history card navigation

The regex for card id was not sufficient in the case of "Carte Executive ..."
(returned "x").

Closes: 8968@zendesk
parent 42475507
......@@ -772,7 +772,7 @@ class ComingPage(OperationsPage, LoggedPage):
class CardPage(OperationsPage, LoggedPage):
def select_card(self, card_number):
for option in self.doc.xpath('//select[@name="Data_SelectedCardItemKey"]/option'):
card_id = Regexp(CleanText('.', symbols=' '), r'([\dx]+)')(option)
card_id = Regexp(CleanText('.', symbols=' '), r'(\d+x+\d+)')(option)
if card_id != card_number:
continue
if Attr('.', 'selected', default=None)(option):
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment