How to download the file using javascript xpath in pyhton



  • 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.

    enter image description here



  • 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()
    

Log in to reply
 

Suggested Topics

  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2