Ask a Question

How to ScrollUp/Down web page to find a specific element? (Python)

New Contributor

How to ScrollUp/Down web page to find a specific element? (Python)

I want to create a generic function for scroll up/down which will perform the function until the element is visible

Community Hero

And do you want we write it for you ?

Please put your trial before asking.

Un sourire et ça repart

Okay. Solution Accepted. Thank you for the big help.

Sorry i didnt want to be rude but here we are all volunteer, taking our time trying help others.
But as for me you ask a solution without telling us what is your real problem ( scrolling, loop, visible) and no even showing the ideas and trials made.
And that make me feel like we are free dev for others....we aren't that.

So explain more, show you have think about the problem and we can work together..not alone

Un sourire et ça repart

Community Hero



While @BenoitB is absolutely correct with his notes and questions, try to read the documentation for the .scrollIntoView native DOM method. Usually it works well.


  /Alex [Community Hero]
[Community Heroes] are not employed by SmartBear Software but
are just volunteers who have some experience with the tools by SmartBear Software
and a desire to help others. Posts made by [Community Heroes]
may differ from the official policies of SmartBear Software and should be treated
as the own private opinion of their authors and under no circumstances as an
official answer from SmartBear Software.
The [Community Hero] signature is used with permission by SmartBear Software.
SmartBear Alumni (Retired)

Hi @tashishIf you want to find a specific element on a page, you can use special TestComplete features. If an element exists on a page, the tool will find it even if it's under the scroll. I recommend that you read the following article containing more information about finding objects on a web page:


If you do need to scroll until the target object, please use Alex's suggestion - you need to call the scrollIntoView method. You can find an example of how to do this on one of the previous conversations: 

Sonya Mihaljova
Community and Education Specialist

Showing results for 
Search instead for 
Did you mean: