driver.execute("get", {'url': 'http://www.ins.tn/statistiques/90#'})
WebDriverWait(driver, 20).until(EC.element_to_be_clickable((By.XPATH, "//div[@class='export']//a[@class='btnexport ' and starts-with(@id, 'btnExporttoExcel')]"))).click()
笔记
:您必须添加以下导入:
from selenium.webdriver.support.ui import WebDriverWait
from selenium.webdriver.common.by import By
from selenium.webdriver.support import expected_conditions as EC