webdriver
webdriver copied to clipboard
Get Element Rect remote end steps don't match non-normative comment
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.
WebKit bug: https://bugs.webkit.org/show_bug.cgi?id=213139
@burg do you know if there are tests for this that reveal what geckodriver and chromedriver do?
@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.