From 4ead3eb9f387887415823016ee49fcdb8ac833d5 Mon Sep 17 00:00:00 2001 From: aurelien Date: Fri, 18 Jun 2021 21:56:42 +0200 Subject: [PATCH] correctif xpath --- 07_test_admission.py | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/07_test_admission.py b/07_test_admission.py index d074a36..2b6e77f 100644 --- a/07_test_admission.py +++ b/07_test_admission.py @@ -156,13 +156,10 @@ class PythonOrgSearch(unittest.TestCase): self.wait.until(EC.url_changes(url)) urlTmp = driver.current_url driver.find_element_by_xpath("//a[contains(text(),'Jury')]").click() - driver.find_element_by_link_text("Saisie des décisions du jury") + driver.find_element_by_link_text("Saisie des décisions du jury").click() self.wait.until(EC.url_changes(urlTmp)) - time.sleep(1) urlTmp = driver.current_url - driver.find_element_by_xpath( - "//a[contains(@href,'formsemestre_validation_auto')]" - ).click() + driver.find_element_by_partial_link_text("Calcul automatique").click() self.wait.until(EC.url_changes(urlTmp)) urlTmp = driver.current_url driver.find_element_by_xpath("//input[@type='submit']").click() @@ -176,7 +173,7 @@ class PythonOrgSearch(unittest.TestCase): searchBar.send_keys("EID10") searchBar.submit() time.sleep(5) - self.assertTrue("en cours" in driver.find_element_by_class_name("rcp_dec").text) + self.assertTrue("en cours" in driver.page_source) def test_060_declarer_defaillance(self): driver = self.driver