Feature to scroll to the last div or last row of a table

Hints, tips and tricks for newbies

Moderators: Dorian (MJT support), JRL

Post Reply
User avatar
uniadv
Junior Coder
Posts: 29
Joined: Tue Aug 04, 2020 2:16 am

Feature to scroll to the last div or last row of a table

Post by uniadv » Sun Aug 16, 2020 12:58 pm

Hi Team,
I'm looking for a feature in Chrome which can scroll the page to the last element of a div or scroll to the last row of a table. I couldn't figure out if its possible.
There is a pages which has empty list of div which fills in automatically as we scroll the page. I don't prefer to use either mouse or keystrokes for scrolling and i always keep this as a last option.
Any help!

Regards,
Ushahra

User avatar
Marcus Tettmar
Site Admin
Posts: 7395
Joined: Thu Sep 19, 2002 3:00 pm
Location: Dorset, UK
Contact:

Re: Feature to scroll to the last div or last row of a table

Post by Marcus Tettmar » Mon Aug 17, 2020 4:02 pm

About all I can think of is to inject some javascript which scrolls the element into view using scrollIntoView method:
https://www.w3schools.com/jsref/met_ele ... toview.asp

And here's a function which will execute javascript:
viewtopic.php?f=8&t=10569#p44959
Marcus Tettmar
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar

Did you know we are now offering affordable monthly subscriptions for Macro Scheduler Standard?

User avatar
uniadv
Junior Coder
Posts: 29
Joined: Tue Aug 04, 2020 2:16 am

Re: Feature to scroll to the last div or last row of a table

Post by uniadv » Wed Aug 19, 2020 8:13 am

Thanks Marcus Tettmar,
That worked but not working for "Xpath". I generally deal with different element by their Xpath because its uniqueness but i guess scrollIntoView doesn't work with Xpath. Temporally I'm using MoveMouse inside the loop to scroll down to find certain element. But is their any other way to workout with?

Regards

Post Reply
Sign up to our newsletter for free automation tips, tricks & discounts