I need to scroll the webpage 'https://en.wikipedia.org/wiki/United_States' for every 600 pixels, in the below mentioned flow :-
"window.scrollTo(0,600)" > time.sleep(1) > take screenshot > "window.scrollTo(600, 1200)" > time.sleep(1) > take screenshot ...untill the element - "Privacy policy" is not visible with locator='//a[@title="wmf:Privacy policy"]' and locatorType="xpath"
Can someone please suggest the shortest way to achieve this using any loop?