From d27e366d97877aea8c941622659f066303531a06 Mon Sep 17 00:00:00 2001 From: Mathieu Benoit Date: Sun, 20 Jul 2025 02:42:10 -0400 Subject: [PATCH] [FIX] selenium: improve login odoo, need to wait for odoo 18 --- script/selenium/web_login.py | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/script/selenium/web_login.py b/script/selenium/web_login.py index 84ff8ed..5113932 100755 --- a/script/selenium/web_login.py +++ b/script/selenium/web_login.py @@ -32,14 +32,11 @@ def fill_parser(parser): def run(config, selenium_tool): # Trouvez les éléments du formulaire - courriel_input = selenium_tool.driver.find_element(By.NAME, "login") - mot_de_passe_input = selenium_tool.driver.find_element(By.NAME, "password") - div_connexion_button = selenium_tool.driver.find_element( - By.CLASS_NAME, "oe_login_buttons" - ) - connexion_button = div_connexion_button.find_element( - By.CLASS_NAME, "btn-primary" - ) + courriel_input = selenium_tool.get_element(by=By.NAME, value="login") + mot_de_passe_input = selenium_tool.get_element(by=By.NAME, value="password") + # div_connexion_button = selenium_tool.get_element(by=By.CLASS_NAME, value="oe_login_buttons") + connexion_button = selenium_tool.get_element(by=By.CSS_SELECTOR, value="[type='submit']") + # try: # connexion_button = selenium_tool.driver.find_element( # By.XPATH,