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

1 Like

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

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.