Skip to content

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

suggestion: Update browser_use/dom/dom_tree/index.js

2pacd51b6e73daff
diff --git a/browser_use/dom/dom_tree/index.js b/browser_use/dom/dom_tree/index.js
index 3e5b048c8..3f7d88b1d 100644
--- a/browser_use/dom/dom_tree/index.js
+++ b/browser_use/dom/dom_tree/index.js
@@ -853,10 +853,10 @@
const checkPoints = [
// Initially only this was used, but it was not enough
{ x: rect.left + rect.width / 2, y: rect.top + rect.height / 2 },
- { x: rect.left + margin, y: rect.top + margin },
- { x: rect.right - margin, y: rect.top + margin },
- { x: rect.left + margin, y: rect.bottom - margin },
- { x: rect.right - margin, y: rect.bottom - margin }
+ { x: rect.left + margin, y: rect.top + margin }, // top left
+ // { x: rect.right - margin, y: rect.top + margin }, // top right
+ // { x: rect.left + margin, y: rect.bottom - margin }, // bottom left
+ { x: rect.right - margin, y: rect.bottom - margin }, // bottom right
];
return checkPoints.some(({ x, y }) => {