Python Forum
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
If else
#7
i was successful after some research you suggested to me, here is my code i hope it is correct.
#Download
try:
        dossier = driver.find_element_by_xpath(f"//*[@title={date} ]")
        dossier.click()
        download = driver.find_element_by_xpath("//span[contains(.,'Télécharger')]")
        download.click()
        driver.close()
        driver.quit()
except NoSuchElementException:  #Erreur lors de l'execution
        print ("Pas de fichier")
        driver.close()
        driver.quit()
Reply


Messages In This Thread
If else - by africanism - Apr-16-2021, 07:31 AM
RE: If else - by ndc85430 - Apr-16-2021, 07:39 AM
RE: If else - by africanism - Apr-16-2021, 07:48 AM
RE: If else - by ndc85430 - Apr-16-2021, 08:02 AM
RE: If else - by africanism - Apr-16-2021, 08:38 AM
RE: If else - by ndc85430 - Apr-16-2021, 10:15 AM
RE: If else - by africanism - Apr-16-2021, 10:45 AM

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020