Page 1 of 1

Scroll page down

Posted: Wed Apr 16, 2025 3:25 pm
by Maksym
What is the most reliable way to programmatically scroll the page down inside the browser? I know I can send the WM_KEYDOWN event and then the WM_KEYUP event with the code of the [End] button, and it works. But not when some input inside the page has the focus.

So, I need to make sure that when the page CAN be scrolled down (it has a vertical scrollbar, and that scrollbar is not at the bottom), it WILL be scrolled down without any interaction from the user. Is it possible? Maybe the WM_MOUSEWHEEL is reliable in this case? Will it work if the browser has no focus at all (it's invisible). Maybe I do not need to use any events, and there is some internal mechanism for that available in CEF?

Thank you in advance!

Re: Scroll page down

Posted: Thu Apr 17, 2025 8:08 am
by salvadordf
Hi,

Try executing this JS code:
https://stackoverflow.com/questions/11715646/scroll-automatically-to-the-bottom-of-the-page

Re: Scroll page down

Posted: Thu Apr 17, 2025 9:07 am
by Maksym
Thank you Salvador! I'll try!