Skip to content
Advertisement

How to know scroll bar is at end in selenium python

I am implementing a while loop in selenium, and want to condition my while loop, so when the scroll bar is at its end of its scroll the while loop should stop. How can i code this type of condition in while loop? Iam using Keys.DOWN and my while loop is right now set to True

My code of while loop:

JavaScript

Advertisement

Answer

Here is the pseudo code that should do the trick.

Check if the current (scrolled position+ window height) is greater than page height(-1)

JavaScript
User contributions licensed under: CC BY-SA
8 People found this is helpful
Advertisement