I came up in a scenario where I have floating button to identify. There is two buttons, Save and Cancel. When I am on top of the page buttons are like in a floating panel and once I scroll down and reach the bottom of the page then button will be fixed. So both cases I have two different identifier to identify the buttons. I am using the below code to scroll down.
My question is, when I scroll down, how to know I reached the end of the page or not? Because I cannot scroll like unlimited time right? Once I reached the bottom of the page I can stop scrolling and check for the fixed button element.