Skip to content

Commit 1350abe

Browse files
committed
Fix variable handling in actHandler
1 parent 64cbc6e commit 1350abe

File tree

3 files changed

+7
-2
lines changed

3 files changed

+7
-2
lines changed
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"stagehand": patch
3+
---
4+
5+
Fix variable replacement in actHandler

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
44

55
[project]
66
name = "stagehand"
7-
version = "0.5.9"
7+
version = "0.5.10"
88
description = "Python SDK for Stagehand"
99
readme = "README.md"
1010
classifiers = [ "Programming Language :: Python :: 3", "License :: OSI Approved :: MIT License", "Operating System :: OS Independent",]

stagehand/handlers/act_handler.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ async def act(self, options: Union[ActOptions, ObserveResult]) -> ActResult:
9696
if options.get("variables"):
9797
variables = options.get("variables", {})
9898
element_to_act_on.arguments = [
99-
str(arg).replace(f"%{key}%", str(value))
99+
str(arg).replace(f"{key}", str(value))
100100
for arg in element_to_act_on.arguments or []
101101
for key, value in variables.items()
102102
]

0 commit comments

Comments
 (0)