How to ScrollUp/Down web page to find a specific element? (Python)
SOLVED- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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
Solved! Go to Solution.
- Labels:
-
Keyword Tests
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
And do you want we write it for you ?
Please put your trial before asking.
Un sourire et ça repart
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Okay. Solution Accepted. Thank you for the big help.
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
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.
https://community.smartbear.com/t5/custom/page/page-id/hall-of-fame
================================
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi @tashish! If 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:
https://support.smartbear.com/testcomplete/docs/app-testing/web/general/common-tasks/finding-objects...
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
