From 92c884a18a6af5b47a4196e0b4282f1403918b5c Mon Sep 17 00:00:00 2001 From: Daniel Erat Date: Sun, 21 Apr 2024 07:45:48 -0400 Subject: [PATCH] Fix MoveTo docs regarding origin for offsets WebElement.MoveTo's documentation stated that the supplied offsets are interpreted relative to the element's center, but this seems to be incorrect. Since remoteWE's implementation always passes "xoffset" and "yoffset" parameters, the offsets are interpreted relative to the element's top-left corner. --- selenium.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/selenium.go b/selenium.go index ecd8c91..bc6b387 100644 --- a/selenium.go +++ b/selenium.go @@ -442,8 +442,8 @@ type WebElement interface { Submit() error // Clear clears the element. Clear() error - // MoveTo moves the mouse to relative coordinates from center of element, If - // the element is not visible, it will be scrolled into view. + // MoveTo moves the mouse to relative coordinates from the top-left corner of the element. + // If the element is not visible, it will be scrolled into view. MoveTo(xOffset, yOffset int) error // FindElement finds a child element.