Scroll down to bottom of a page with infinite scroll

Hello Everyone,

I want to scroll down to bottom of a page with infinite scroll or scroll to load type page,
I was able to do with “hotkey”, its take 2-3 mins for 300 units of data,
So, is there is any method to scroll to bottom of page in less time or instantly,
Page is build using javascript, cannot share the page

Thanks in advacne

1 Like

Hi @RK_0

could you refer this link

also Hot key Ctrl +End will take you directly to the bottom of the page.


1 Like

Thanks for the response,
Well, I already used the send hotkey, but the page is scroll to load , if use hotkey eg; end, it will only load another 10 units, next time 20 units

in the below image, I used end 2 times;

Hi @RK_0

Have a look on the video link and thread


1 Like

Hello @RK_0

You can use it as a while loop with a combination of element exists and send hotkeys.

Element exists is to check for some element at the bottom of the page, if its false then do a sendhotkey down arrow.

so loop will continue till the bottom of the page.

HI @RK_0

You can try with this to packages


1 Like

Thank you for the support.

Cannot use these packages, i will the check posts you shared above
Thanks again,

1 Like

Thanks for the response.

Well, I already did that but, it consumes a lot of time,
Is there any other method which faster like that can be done in few seconds

Have you sued the Mouse scroll activity?

Well, i tried this activity, its asking for number of scroll, but number is dynamic as the data gets updated daily

Hi @RK_0,

One other UI alternative is

You identify the last item or bottommost element and Set Focus to it. It will instantly focus on that element in the browser (Scrolls down to the element automagically!). It may also need some checks either before or after so that you are sure that you are at the bottom of the page.

Invoke Javascript
I would look for ways to do it with Javascript (Invoke Javascript activity) with some checks either before or after the script runs to ensure that the end of the page is reached or not.

1 Like

Thanks for the response.

Is there any javascript/inject javascript to scroll down to the bottom of the page? If possible, please share.

Thanks again

Hi @RK_0,

There are approaches already available, you have to wrap them in your inject javascript activity and run it.

I like the one from “PixelsTech”
javascript - Scroll Automatically to the Bottom of the Page - Stack Overflow

window.scrollTo(0, document.body.scrollHeight || document.documentElement.scrollHeight);

Here is an example with a long forum thread

Sample .xaml file
ScrollToBottomOfWebPage.xaml (19.1 KB)

The approach may need some edits as we do not know how your webpage looks like and how it would behave.

Hope this helps you and others.

1 Like

Hi @RK_0

Try the Inject JS script activity


window.scrollTo(0, document.body.scrollHeight);}"

Indicate the browser screen on which you want to scroll to the bottom

1 Like

@kumar.varun2 @jeevith

Thanks for sending js, both worked but there is small issue,

this is before code;
after running js;
it scrolled only once and 547 is not constant; page is scroll to load data;
Each scroll will load new data

You can get 547 (or any dynamic number) text, convert to int, divide by 10, round it up to get how many times you need to loop.


In this case it will be 54 times.

For each Enumerable.Range(0,54)
Inject Javascript

In the end you can check if your Element reads for example 547/547 then you know the workflow did its job.

1 Like


I tried with your instruction but im am not able to acheive it,

if possible can you share the javascript file


Hi @RK_0 ,

You can achieve this by editing xaml file.

Here is the approach. Remember in your case you will have to extract the 547 value and pass it as DummyPageCount (rename the variable as well).

Here Cint(Math.Ceiling(cint(DummyPageCount)/10)) is

  1. Converting the DummyPageCount string to Int then dividing by 10
  2. The value is then rounded using Math.Ceiling. This provides the higher double value
  3. Finally convert the double to int by using Cint

The delay before injecting javascript is to ensure that the page gets some time to render the results. You can optimize this as you wish.

Updated file :
ScrollToBottomOfWebPage.xaml (24.8 KB)

1 Like

Thanks for the support.

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.