I want to scroll down the page with selenium and python in an loop.
browser.execute_script("window.scrollTo(0, 40)")
^ this works so far.
but how can I reference a variable which will increase with every iteration?
e.g.
def scroll():
global xx
xx = 10
while True:
browser.execute_script("window.scrollTo(0, xx)")
xx += 10`
I can see the problem.. the input (window.scrollTo(0, xx)) is a string.
but I dont know how to fix it. Do I need to change the executed script?