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

Method scroll_down

seleniumbase/core/sb_cdp.py:3486–3493  ·  view source on GitHub ↗

Scrolls down as a percentage of the page.

(self, amount=25)

Source from the content-addressed store, hash-verified

3484 self.loop.run_until_complete(self.page.wait(0.1))
3485
3486 def scroll_down(self, amount=25):
3487 """Scrolls down as a percentage of the page."""
3488 try:
3489 self.loop.run_until_complete(self.page.scroll_down(amount))
3490 except Exception:
3491 amount = self.get_window_size()["height"] * amount / 100
3492 self.execute_script("window.scrollBy(0, %s);" % amount)
3493 self.loop.run_until_complete(self.page.wait(0.1))
3494
3495 def save_page_source(self, name, folder=None):
3496 from seleniumbase.core import log_helper

Callers 15

raw_gui_click.pyFile · 0.45
raw_ahrefs.pyFile · 0.45
test_presentation_4Method · 0.45
raw_priceline.pyFile · 0.45
raw_amazon.pyFile · 0.45
raw_cdp_with_sb.pyFile · 0.45
raw_reddit.pyFile · 0.45
raw_nordstrom.pyFile · 0.45
crawlFunction · 0.45
mainFunction · 0.45

Calls 3

get_window_sizeMethod · 0.95
execute_scriptMethod · 0.95
waitMethod · 0.45

Tested by 1

test_presentation_4Method · 0.36