I am attempting to download a csv file, which is available by clicking the button entitled 'Export Data' on this webpage. Given that the button runs a javascript procedure, I am trying to utilise selenium for this. My current attempt below generates the error message:
"WebDriverException: unknown error: missing or invalid 'entry.level' (Session info: chrome=63.0.3239.132) (Driver info: chromedriver=2.27.440174 (e97a722caafc2d3a8b807ee115bfb307f7d2cfd9),platform=Windows NT 10.0.16299 x86_64)"
chrome_path = path
driver=webdriver.Chrome(chrome_path)
url = 'http://www.fangraphs.com/projections.aspx?pos=all&stats=bat&type=fangraphsdc&team=0&lg=all&players=0&sort=24%2cd'
driver.get(url)
driver.find_element_by_xpath('//*[@id="ProjectionBoard1_cmdCSV"]').click()
The error occurs on the final line of code. Any ideas?