Skip to content

Commit

Permalink
Do not click on Historique - go to page
Browse files Browse the repository at this point in the history
  • Loading branch information
mdeweerd committed Dec 23, 2023
1 parent c919e28 commit 9f74b12
Showing 1 changed file with 11 additions and 14 deletions.
25 changes: 11 additions & 14 deletions apps/meters_to_ha/meters_to_ha.py
Original file line number Diff line number Diff line change
Expand Up @@ -1541,20 +1541,15 @@ def get_veolia_idf_file(self):

menu_type = str(el.get_attribute("innerHTML"))

# Click on Menu #####

self.click_in_view(
By.XPATH,
r"//span[contains(text(), 'CONTRATS')"
r" or contains(text(), 'HISTORIQUE')]",
wait_message="Wait again for button HISTORIQUE/CONTRATS",
click_message="Click on button HISTORIQUE/CONTRACTS",
delay=2,
)
self.mylog(st="OK")

# GESTION DU PARCOURS MULTICONTRATS
if menu_type == "CONTRATS":
if menu_type == "HISTORIQUE":
# Click on HISTORIQUE does not always work, go to page #####
self.site_url = "https://espace-client.vedif.eau.veolia.fr/s/"
self.__browser.get(self.__class__.site_url + "historique")
self.mylog(st="OK")
time.sleep(0.5) # Small wait after submit
self.__wait.until(document_initialised)
elif menu_type == "CONTRATS":
# GESTION DU PARCOURS MULTICONTRATS
time.sleep(2)
contract_id = str(self.configuration[PARAM_VEOLIA_CONTRACT])
self.click_in_view(
Expand All @@ -1564,6 +1559,8 @@ def get_veolia_idf_file(self):
click_message="Click on contract",
delay=0,
)
time.sleep(0.5) # Small wait after submit
self.__wait.until(document_initialised)

time.sleep(2)

Expand Down

0 comments on commit 9f74b12

Please sign in to comment.