I am using Selenium
for navigating the following website:
https://apps1.eere.energy.gov/sled/#/
I would like to have data for a city like Boston
: what I am doing is the following:
from selenium import webdriver
from selenium.webdriver.common.keys import Keys
from selenium.webdriver.firefox.firefox_binary import FirefoxBinary
driver = webdriver.Firefox()
driver.get("https://apps1.eere.energy.gov/sled/#/")
search = driver.find_element_by_class_name('sr-only')
search.send_keys("Boston")
search.send_keys(Keys.RETURN)
time.sleep(5)
tmp = driver.find_element_by_css_selector("a.csv-link")
This methodology allow me to arrive at the following webpage:
Now I would like to download a csv
file under State and National Retail Electricity Rate Trends
by clicking on Download Chart
and then Download Chart\Data CSV
.
I try to click on it:
tmp.click()
but I got the error:
ElementNotInteractableException: Message:
I report in the inspecting the button (Download Chart/Data
) I would like to click by showing the screenshot of the inspection element in Firefox.