How to click on Export using url through Selenium

  Kiến thức lập trình

URL Download image
I have URL which opens a View and then I have to click on three dots ( see image ) then Export and then Export to Microsoft Excel, this excel file gets downloaded in downloads folder. I want to automate this using python and also want to change save location.

I tried using below code but its not working

from selenium import webdriver
from selenium.webdriver.support.ui import WebDriverWait as wait
from selenium.webdriver.common.by import By
from selenium.webdriver.support import expected_conditions as EC

browser = webdriver.Chrome()
url = 'URL'
browser.get(url) 

button = wait(browser, 10).until(EC.element_to_be_clickable((By.CLASS_NAME, "is-xlsx")))
button.click()

browser.close()

New contributor

RaO is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.

LEAVE A COMMENT