Apr-16-2021, 07:31 AM
(This post was last modified: Apr-16-2021, 07:57 AM by africanism.)
Hello everyone, I'm new to python and I'm blocking on a piece of code, basically I would like that in the if condition, if the condition is true it executes otherwise it goes on.
if driver.find_element_by_xpath(f"//*[@title={date} ]") dossier = driver.find_element_by_xpath(f"//*[@title={date} ]").click() download= driver.find_element_by_xpath("//span[contains(.,'Télécharger')]").click() driver.close() driver.quit() else driver.close() driver.quit()Thanks for your help