Skip to content

Open-source Python library for AI browser agents, plus Browser Use Cloud: stealth browsers and a hosted agent API.

Include xpath

magmueller3696a3b7ed15
diff --git a/browser_use/controller/views.py b/browser_use/controller/views.py
index 02bbec176..c1befdad7 100644
--- a/browser_use/controller/views.py
+++ b/browser_use/controller/views.py
@@ -15,11 +15,13 @@ class GoToUrlAction(BaseModel):
class ClickElementAction(BaseModel):
index: int
num_clicks: int = 1
+ xpath: Optional[str] = None
class InputTextAction(BaseModel):
index: int
text: str
+ xpath: Optional[str] = None
class DoneAction(BaseModel):