GuruAtWork
1 min readJun 25, 2020

--

Is it neccessary to run this headless?
I was not able to replicate and the headless mode made it harder to debug.
the html on the target page appears to have changed since this was written.

code below downloaded file to the chrome default download directory. does not retrieve the name of the file, which makes filehandling difficult.
ie on windows C:\Users\<username>\Downloads


from selenium import webdriver
driver = webdriver.Chrome()
driver.implicitly_wait(10)
driver.get(“https://www.thinkbroadband.com/download")
link_elem = driver.find_element_by_xpath(“//*[@id=’main-col’]/div/div/div[8]/p[1]/a/img”)
link_elem.get_attribute(‘innerHTML’)
link_elem.click()
driver.capabilities[‘browserVersion’]
‘81.0.4044.122’

--

--

GuruAtWork
GuruAtWork

Written by GuruAtWork

Machine Learning, data analysis and Artificial Intelligence developer.

Responses (2)