I am using below to download a .txt file from a webpage.
The webpage has a button and when you click on it, it starts a download of .txt file straight (not giving choice for destination folder selection). For example if using Chrome, the downloaded file goes into the default folder on local drive.
Using Python and Selenium it simply is:
driver = webdriver.PhantomJS()
url = www.the_url_link.com
driver.get(url)
driver.find_element_by_xpath("the_xpath_here").submit()
driver.implicitly_wait(5)
driver.close()
it runs smoothly and returned no error so I assume it's successful. the problem is that I can’t find the downloaded file.
where are they? And if there are more than one, can I rename them?
Many thanks.