I'm using selenium with python 3 and Chrome driver. I'm trying to perform a scroll in a chrome store URL.
This one: https://chrome.google.com/webstore/detail/online-game-zone-new-tab/abalcghoakdcaalbfadaacmapphamklh
No matter what I tried - the site doesn't scroll. Tried running "window.scrollBy" and "window.scrollTo". Tried clicking on "body" first, and other elements - nothing.
current code:
driver.maximize_window()
driver.get(url)
time.sleep(4)
driver.execute_script("window.scrollBy(0, 500)")
What could be the problem? I don't want to send a "down" key or "page down" since I believe I'll need to be more precise.
Scrolling an element into view seems to be working fine on that webpage. Here's an example:
footer=driver.find_element_by_class_name('e-f-ra-gj')
driver.execute_script("arguments[0].scrollIntoView()", footer)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With