How to scroll down until some element is visible?

Hello guys,

I have a list of almost 300 elements on the webpage. What I need to do is to scroll down(using Send-Hotkey activity[down]) until I come to 105th element.

I thought of using Do-While activity: with Send-Hotkey activity in Body, but can’t figure out what should I put in Condition. Tbh I don’t know how to implement logic to achieve my task.

How would you solve that?
Thanks in advance. :pray:

You can use a simple click activity with use the SimulateClick or SendWindowsMessage property Checked. the button is clicked even if it is not visible.


Mukesh

I need to use Get Text activity, not Click activity.
Get Text doesn’t have SimulateClick or SendWindowsMessage properties.

@bp777

Or you can do this manually first, and count how many times you clicked before the thing you want appeared. So using a While Loop.

you can set two variables, of type Int32 and varibale one could be NumberOfClicks = 105 and second varible could be CounterVariable = 0.
in the loop condition say CounterVariable is < NumberOfClicks and then in the body send hotkeys or click.
and still, inside the while look drag the assign activity and inside it say CounterVariable = CounterVariable + 1

1 Like

@bp777 but you said you want to scrol down, what are you doing with the get text?, please explain the process again, now i a m confused

1 Like

Hi…
@bp777 for initial configuration take an element exist activity for reference in while loop, send hot key of page down until element found. Go through video u will get some idea for page down.

1 Like

That is the logic I want to implement.


But the problem is that my program press Down button only once instead of going down for a while until it reaches to 13th element.

Take the downside of the element, which means in the page of last element and try with hot key of down arrow or if pagination of side scroll bar is available then take a click activity and place that activity inside while loop to click down to the page