MCPcopy Create free account
hub / github.com/THUDM/AgentTuning / execute_scroll

Function execute_scroll

eval_heldout/webarena/browser_env/actions.py:775–785  ·  view source on GitHub ↗
(direction: str, page: Page)

Source from the content-addressed store, hash-verified

773
774@beartype
775def execute_scroll(direction: str, page: Page) -> None:
776 # perform the action
777 # code from natbot
778 if direction == "up":
779 page.evaluate(
780 "(document.scrollingElement || document.body).scrollTop = (document.scrollingElement || document.body).scrollTop - window.innerHeight;"
781 )
782 elif direction == "down":
783 page.evaluate(
784 "(document.scrollingElement || document.body).scrollTop = (document.scrollingElement || document.body).scrollTop + window.innerHeight;"
785 )
786
787
788@beartype

Callers 1

execute_actionFunction · 0.85

Calls 1

evaluateMethod · 0.45

Tested by

no test coverage detected