Skip to content

Commit 6e5c3f2

Browse files
committed
fix: don't scroll more than page size limits
1 parent 2b6cf82 commit 6e5c3f2

File tree

1 file changed

+1
-1
lines changed
  • lavague-integrations/drivers/lavague-drivers-selenium/lavague/drivers/selenium

1 file changed

+1
-1
lines changed

lavague-integrations/drivers/lavague-drivers-selenium/lavague/drivers/selenium/base.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -254,7 +254,7 @@ def get_scroll_container_size(self, scroll_anchor: WebElement):
254254
if container:
255255
return (
256256
self.driver.execute_script(
257-
"const r = arguments[0].getBoundingClientRect(); return [r.width, r.height]",
257+
"const r = arguments[0].getBoundingClientRect(); return [Math.min(r.width, window.innerWidth), Math.min(r.height, window.innerHeight)]",
258258
scroll_anchor,
259259
),
260260
True,

0 commit comments

Comments
 (0)