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

Function aexecute_scroll

eval_heldout/webarena/browser_env/actions.py:789–799  ·  view source on GitHub ↗
(direction: str, page: APage)

Source from the content-addressed store, hash-verified

787
788@beartype
789async def aexecute_scroll(direction: str, page: APage) -> None:
790 # perform the action
791 # code from natbot
792 if direction == "up":
793 await page.evaluate(
794 "(document.scrollingElement || document.body).scrollTop = (document.scrollingElement || document.body).scrollTop - window.innerHeight;"
795 )
796 elif direction == "down":
797 await page.evaluate(
798 "(document.scrollingElement || document.body).scrollTop = (document.scrollingElement || document.body).scrollTop + window.innerHeight;"
799 )
800
801
802@beartype

Callers 1

aexecute_actionFunction · 0.85

Calls 1

evaluateMethod · 0.45

Tested by

no test coverage detected