How to scroll down to end of the webpage without using "Send hot key"?

In my project application, there is a User master web-page. In that, I have to get to the bottom of the webpage and click on a Button and do some operations later.
But here I don’t want to use Send Hotkey Activity! If I use I am sure my code will not get passed from the subsequent testing teams.
Is there any way to perform this task, without using Send Hotkeys?

Interesting…
I havent seen it directly in UiPath, but you could try using one of these two packages:

Directly from marketplace but les granular and using script:

From NuGet and mor granular, simulating the scroll wheel:

Good Luck!

2 Likes

You could also change the click activity to “simulate”. You can find this setting as last entry of the properties panel for the click activity. This will allow for the selector to be clicked even if the button is not displayed on the screen.

2 Likes

Hi @ziga.hanzic
Thanks for the update. I have gone thru the Skcript - Scroll page template, but the irony is that they too used Send Hotkey but in a sophisticated way that’s it :sweat_smile:

I’ll give it a go for the Scroll Activity!!

Yes, @JosephNehl…That’s the best way to avoid hotkey usage, but I’ve tried that in the beginning. It is not working every time because the data in the webpage is completely dynamic the sometimes it might get an increased to 1000+ rows so, it is throwing a routine error “Cannot find the UI element corresponding to this selector”! when the I have huge data.

1 Like

I see, that is a very interesting point. I wonder how large the page can be before this type of issue will appear. I will try and think of other options and if I find anything will let you know.

The webpage is like View of a Backend DB. So if users are getting added then DB rows will be increased accordingly. Adding and deleting users will be a daily process in DB, so the size of the webpage will be dynamic completely.

To get understand how big I’ll try to explain in layman’s terms :grimacing: manually to get the bottom of the page with the mouse we have to scroll 7 times with the scroll button. (7 Times is the minimum number of scrolls)

Maybe you want to inject JS for that:

Thanks for the insight!!
But I exactly don’t know the web page end position to use that JS method!

In this case I repeat this as long as the size of text on the page does not increase any more:

Set the the click to ‘Simulate Click’ and then set the “AlterIfDisabled” to ‘True’ in the Options in the property panel (Same place you found the simulate click property. This should work cause I had same issue as you do.

Hi @ManiPrajwal_K

May be you had a solution already. Replying here for an alternative.

I remember @NIVED_NAMBIAR had a good alternative.

He suggested to use the Set Focus activity on an element which is at the bottom of the webpage. That way you can automatically simulate a scroll effect and the element is ready for interaction.

This is a good solution than sending hotkey because

  1. It works in any webpage

  2. If the element appears dynamically then setting the set focus action along with element exists in a retry scope would continue to scroll until the element is found ( risk of infinite loop must be checked for)

  3. Avoids use of hotkeys

1 Like

It should be noted that since this topic was last updated (and given it has not been closed I think it’s fair to add this) the modern activity “Mouse Scroll” has been added, which can be used to scroll either a number of times or to a particular element.