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

Function aexecute_scroll

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

Source from the content-addressed store, hash-verified

936
937
938async def aexecute_scroll(direction: str, page: APage) -> None:
939 # perform the action
940 # code from natbot
941 if direction == "up":
942 await page.evaluate(
943 "(document.scrollingElement || document.body).scrollTop = (document.scrollingElement || document.body).scrollTop - window.innerHeight;"
944 )
945 elif direction == "down":
946 await page.evaluate(
947 "(document.scrollingElement || document.body).scrollTop = (document.scrollingElement || document.body).scrollTop + window.innerHeight;"
948 )
949
950
951def execute_key_press(key: str, page: Page) -> None:

Callers 1

aexecute_actionFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected