Hello Stackoverflow Users!
On many internet sites, there are some scrollable div containers. For example on facebook, if you click on any event and would like to know who is taking part in this event. You click on the button, it opens a list and you can see all the people. Another example, if you visit any instagram profile and click on "followers". Then it opens again a list and you can see all followers. These lists can be very long and a trick, to scroll all the list down, is press the "space" key on the keyboard.
My Question:
1.) How can I give Selenium the command, to press the "space" key for x seconds?
or
2.) How can I scroll these lists (not the browser site[only the div container]) automatically to the bottom?
I tried:
driver.FindElement(By.XPath("//div[contains(.,'followers')]")).SendKeys(Keys.Space);
I use:
Selenium, C#, chromedriver