It is a pop up window coming and I wish to download the file using python selenium webdriver(chrome driver). However it is not taking the switch to alert text. Please help.
Your syntax is wrong and you are clicking a wrong tag, and also you have to import By class
You should click-Button element:
from selenium.webdriver.common.by import By driver.find_element(By.XPATH, '//button[@class="btn btn-sm btn-success pull-right"]').click()