0
Scroll to bottom of page in Selenium with browser minimized
Iām doing an automation task with selenium via Python, and I need the browser minimized while it runs, but I have encountered a problem where the ActionsChain scroll_by_amount doesnāt seem to work at all. It runs without error but does nothing when the browser is minimized. I need to scroll to the bottom of the page. If I try to scroll to the footer element itself, it says itās out of bounds because itās somehow wider than the webpage, even though it could be vertically scrolled to.
5 Antwoorden
+ 1
TYJ, I found a solution: driver.find_element(By.TAG_NAME, āhtmlā).send_keys(Keys.END)
+ 4
Your code?
In general element must be identified beforehand.
+ 2
This is not a mistake but a limitation.
+ 1
JaScript
driver.minimize_window()
ActionChains(driver).scroll_by_amount(0, any_integer).perform() #Does nothing once browser is minimized
I think it may be a bug in Selenium, but since Iām new to the library Iām not certain.
0
JaScript What a shame. You can scroll to elements but not by amount?