How do we keep the bot on scrolling unti it reache the top and stop?

How do we keep the bot on scrolling unti it reache the top and stop ? . As you can see on my screenshot below . I want the bot to keep on scrolling until it reach the top and nothing more to scroll . What is the best implementation or technique with that ? Thank you.

@AhmedKutraphali - Ctrl+Home

I tried bro it only goes on the middle

@AhmedKutraphali - Ctrl + Home never stops in the middle unless until you have more content to load on that page…in this case, send the ctrl+home multiple times…

I think ctrl + home does not work in all desktop app specially a pop-up window that has scroll