I'm trying to download files from a website using python. I want it to be automaticaly downloaded but this button don't have an url or xpath. I tried this code but I didn't found a good result :
from selenium import webdriver
from webdriver_manager.chrome import ChromeDriverManager
download_dir = 'C:/Users/ASUS/Documents/data'
driver = webdriver.Chrome("C:/chrome/chromedriver.exe")
driver.get("http://www.ins.tn/statistiques/90#")
button = driver.find_element_by_class_name('btnexport')
button.click()