I want the link of latest version of csv . If new version will come then I my program will pick latest href link.
Output :- https://www.nucc.org/images/stories/CSV/nucc_taxonomy_201.csv
home_page1 = "https://www.nucc.org/index.php/code-sets-mainmenu-41/provider-taxonomy-mainmenu-40/csv-mainmenu-57" driver = webdriver.Chrome("xx\xx\chromedriver.exe") driver.get(home_page1) elements = driver.find_elements_by_css_selector("li a") for link in elements: print(link.get_attribute('href'))
Advertisement
Answer
iv looked at the website and its seems that you can do that by selenium “find_element_by_xpath”. iv attached a photo.
so the right XPATH IS
//*[@id="main"]/div[2]/div/div/div[3]/div/ul[1]/li/a
please check if its working again when the new version is coming.
and then you can look for it with this command :
login_form = driver.find_element_by_xpath("//*[@id="main"]/div[2]/div/div/div[3]/div/ul[1]/li/a")
let me know if it was helful.