webdriver icon indicating copy to clipboard operation
webdriver copied to clipboard

Get Element Rect remote end steps don't match non-normative comment

Open burg opened this issue 4 years ago • 3 comments

In chapter 12. Elements, section 12.3 State:

Calculate the absolute position of element and let it be coordinates.

I received a bug report that safaridriver's Get Element Rect command should be returning iframe-relative coordinates. So I went to look at the spec, and the Note does suggest this:

"y - Y axis position of the top-left corner of the web element relative to the current browsing context’s document element in CSS pixels."

However, the remote end steps compute (x, y) using 'calculate the absolute position' substep, which takes into account the scroll position of the top-level browsing context. Consulting non-local browsing context state seems contrary to the non-normative description.

burg avatar Jun 12 '20 18:06 burg

WebKit bug: https://bugs.webkit.org/show_bug.cgi?id=213139

burg avatar Jun 12 '20 18:06 burg

@burg do you know if there are tests for this that reveal what geckodriver and chromedriver do?

foolip avatar Jul 01 '20 10:07 foolip

@foolip, in Marionette we use the currently selected browsing context to determine the x and y values. Actually I cannot see any wdspec tests beside the very basic ones, that verify any of these values.

whimboo avatar Jul 06 '20 08:07 whimboo