Skip to content

Commit d8d3eda

Browse files
committed
Use stagehand page keyboard instead of locator
1 parent 015646b commit d8d3eda

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

stagehand/handlers/act_handler_utils.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -307,7 +307,7 @@ async def fill_or_type(ctx: MethodHandlerContext) -> None:
307307
async def press_key(ctx: MethodHandlerContext) -> None:
308308
try:
309309
key = str(ctx.args[0]) if ctx.args and ctx.args[0] is not None else ""
310-
await ctx.locator.press(key)
310+
await ctx.stagehand_page._page.keyboard.press(key)
311311
await handle_possible_page_navigation(
312312
"press",
313313
ctx.xpath,

0 commit comments

Comments
 (0)