【发布时间】:2020-03-24 18:33:32
【问题描述】:
我正在尝试在以下链接中单击并下载“Real Sector”: http://www.sbp.org.pk/reports/quarterly/fy19/Second/qtr-index-eng.htm
这是我尝试过的:
driver.get('http://www.sbp.org.pk/reports/quarterly/fy19/Second/qtr-index-eng.htm')
try:
driver.find_element_by_css_selector("a[href= 'Chap-2.pdf']").click()
except NoSuchElementException:
pass
但它给出了以下错误:
ElementNotInteractableException:消息:元素无法滚动到视图中
我该如何解决这个问题?
【问题讨论】:
标签: python-3.x selenium web-scraping