'scrolling down all filter menu linkedin with selenium
i wanted to ask you. How can i scroll down the all filter menu in linkedin. I know how to scroll down a page using
driver.execute_script("window.scrollTo(0,document.body.scrollHeight)")
but i don't know how to scroll inside a menu
Solution 1:[1]
You can use Javascript to scroll an element the same way you scroll the window element:
let elem = document.querySelector('#myelem');
elem.scrollTo(0, elem.scrollHeight);
Which would look something like the following:
driver.execute_script("let elem = document.querySelector('#myelem');elem.scrollTo(0, elem.scrollHeight);")
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | dnorhoj |
