Skip to content

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

get rid of force

mertunsallaa0d1fb00fa6
diff --git a/browser_use/tools/service.py b/browser_use/tools/service.py
index 0e05cc119..600611991 100644
--- a/browser_use/tools/service.py
+++ b/browser_use/tools/service.py
@@ -267,9 +267,8 @@ class Tools(Generic[Context]):
asyncio.create_task(browser_session.highlight_coordinate_click(actual_x, actual_y))
# Dispatch ClickCoordinateEvent - handler will check for safety and click
- # Pass force parameter from params (defaults to False for safety)
event = browser_session.event_bus.dispatch(
- ClickCoordinateEvent(coordinate_x=actual_x, coordinate_y=actual_y, force=params.force)
+ ClickCoordinateEvent(coordinate_x=actual_x, coordinate_y=actual_y, force=True)
)
await event
# Wait for handler to complete and get any exception or metadata
diff --git a/browser_use/tools/views.py b/browser_use/tools/views.py
index fc3eaea93..71342956c 100644
--- a/browser_use/tools/views.py
+++ b/browser_use/tools/views.py
@@ -38,7 +38,6 @@ class ClickElementAction(BaseModel):
index: int | None = Field(default=None, ge=1, description='Element index from browser_state')
coordinate_x: int | None = Field(default=None, description='Horizontal coordinate relative to viewport left edge')
coordinate_y: int | None = Field(default=None, description='Vertical coordinate relative to viewport top edge')
- force: bool = Field(default=False, description='If True, skip safety checks (file input, print, select)')
# expect_download: bool = Field(default=False, description='set True if expecting a download, False otherwise') # moved to downloads_watchdog.py
# click_count: int = 1 # TODO