I'm new to Selenium and not familiar with JavaScript. I'd like to get news links from Top Stories in this link. therefore, I have to scroll only that container which includes headlines. I am using Selenium with Python. My code is
from selenium import webdriver
from selenium.webdriver.common.keys import Keys
import time
driver = webdriver.Chrome('C:\\Program Files (x86)\\Google\\Chrome\\chromedriver.exe')
driver.get("http://www.marketwatch.com/newsviewer")
element = driver.find_element_by_tag_name('html')
element.send_keys(Keys.END)
time.sleep(8)
element.send_keys(Keys.HOME)
I get an error that says: "WebDriverException: Message: unknown error: cannot focus element"
. I read how to scrape an infinite scroll in a page, but scrolling a specific infinite scroll within page is a challenge to me. Any help would be appreciated.