0

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?

  • Please post your current code attempt. When you run it, what does it do? or what does it not do that you are expecting? – JeffC Jan 16 '19 at 19:14
  • Please see a related question https://stackoverflow.com/q/3422262/5356599 . I think scrolling is not required. Full page screenshot is captured by default in Selenium. – Jitendra Jan 16 '19 at 20:39

0 Answers0