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

Method scroll_to_top

seleniumbase/core/sb_cdp.py:3465–3469  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

3463 self.loop.run_until_complete(self.page.wait(0.1))
3464
3465 def scroll_to_top(self):
3466 js_code = "window.scrollTo(0, 0);"
3467 with suppress(Exception):
3468 self.loop.run_until_complete(self.page.evaluate(js_code))
3469 self.loop.run_until_complete(self.page.wait(0.1))
3470
3471 def scroll_to_bottom(self):
3472 js_code = "window.scrollTo(0, 10000);"

Calls 2

evaluateMethod · 0.45
waitMethod · 0.45

Tested by

no test coverage detected