[Webkit-unassigned] [Bug 232996] New: rect returns wrong coordinates after calling scrollIntoView

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Thu Nov 11 06:38:21 PST 2021


https://bugs.webkit.org/show_bug.cgi?id=232996

            Bug ID: 232996
           Summary: rect returns wrong coordinates after calling
                    scrollIntoView
           Product: WebKit
           Version: Safari 14
          Hardware: Mac (Intel)
                OS: macOS 11
            Status: NEW
          Severity: Major
          Priority: P2
         Component: WebDriver
          Assignee: webkit-unassigned at lists.webkit.org
          Reporter: sebastian.klaar at sick.de
                CC: bburg at apple.com

We're using webdriverio to execute automated tests on Safari.

The w3c command "scrollIntoView" causes the following command to return wrong coordinates:
/session/:sessionId/element/:elementId/rect": {
"GET": {
"command": "getElementRect",
"description": "The Get Element Rect command returns the dimensions and coordinates of the given web element.",
"ref": "https://w3c.github.io/webdriver/#dfn-get-element-rect",
"variables": [{
"name": "elementId",
"description": "the id of an element returned in a previous call to Find Element(s)"
}],
"parameters": [],
"returns": {
"type": "Object",
"name": "elementRect",
"description": "A JSON object representing the position and bounding rect of the element."
}
}
}, 

The returned values are off by the amount of scroll range. According to the w3c specification "rect" should return coordinates relative to the browsing context and not to the viewport.

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20211111/1b102487/attachment-0001.htm>


More information about the webkit-unassigned mailing list