MCPcopy Create free account
hub / github.com/seleniumbase/SeleniumBase / scroll_down

Method scroll_down

seleniumbase/fixtures/base_case.py:7014–7020  ·  view source on GitHub ↗

Scrolls down as a percentage of the page.

(self, amount=25)

Source from the content-addressed store, hash-verified

7012 self.execute_script("window.scrollBy(0, -%s);" % amount)
7013
7014 def scroll_down(self, amount=25):
7015 """Scrolls down as a percentage of the page."""
7016 if self.__is_cdp_swap_needed():
7017 self.cdp.scroll_down(amount)
7018 return
7019 amount = self.get_window_size()["height"] * amount / 100
7020 self.execute_script("window.scrollBy(0, %s);" % amount)
7021
7022 def click_xpath(self, xpath):
7023 """Technically, self.click() automatically detects xpath selectors,

Callers

nothing calls this directly

Calls 3

__is_cdp_swap_neededMethod · 0.95
get_window_sizeMethod · 0.95
execute_scriptMethod · 0.95

Tested by

no test coverage detected