Scroll till element

hi all can anyone give me solution upon how to scroll till element on Webpage ?

@supriyad

May i know your objective in scrolling down?

i have one webpage where all company list is given that site is giving me loading icon when i manually scroll down so i need to reach to particular item in that webpage how it is possible then

If you are looking to click on an element you can use click activity page will be automatically scrolled down.

if you want to take screenshot of any element you may use Hover Activity so that page will be scrolled down.

hope this may help you…

2 Likes

no actually i want to make custom activity for scroll to element can you tell me how to pass web element in c# coding so that i can implement whole logic

@supriyad

sorry I don’t have proper knowledge on C#…

ok thank you

Hi Pathrudu,

Hover works for me.I am trying to capture an image so I changed the zoom level.Then Hover stopped working.Only works when zooming level is 100%.How to make it work even on 80%?

Thanks!

Hi Supriyad

Steps.

Use “Image Exists” Activity to mark item till time you want bot to scroll down or do the Page Down (use hotkey activity with Pg Down) for this.

And then add a While loop where you will add boolean variable output from ImageExists with logic to do the pg down till it is not true

Hope this helps.

Regards
Ankit Jain

2 Likes

Try this Javascript code inside Inject Js Script Activity:
function () {
document.getElementById(“ElementID”).scrollIntoView();
}

1 Like

RajaniG: This would actually toggle the scroll lock. Just FYI.

1 Like

Thanks flashsplat, i wasnt aware of that. I used the above to scroll untill specific buttons on a page and it worked.Guess I got soemthing wrong here.

Hi pathrudu,

I have to scroll down and click the button given below the selected item, but it is not working

e.g : I had login to domino’s website
There I have selected onion pizza and I have to click on add to cart of the onion pizza but I’m unable to do that.

Can you help please.
Thanks in advance… :slightly_smiling_face:

1 Like

I have similar usecase, I need scrap the image element using OCR engine for a position.

If I scroll down to the position manually while debugging I am getting exact output, but If I dont scroll down, its showing empty text.

Any suggestions please!

Hi

if u site is loading the screen is appear

User element exits activty in that pass do while activity based on time calucaltion.

Note: How ur site is loading and time take… and also ur site behavior

or

Use Javascript to inject the scroll quries

refer this link : Aneejian | Using Inject JS Script Activity in UiPath

Thanks
Shyam

Issue is resolved by using Mouse scroller by element, activity is available in modern view design.

Thanks all for your time on this.