Closed
Bug 1036365
Opened 11 years ago
Closed 11 years ago
Implement webelement#getElementRect to marionette
Categories
(Remote Protocol :: Marionette, defect)
Tracking
(Not tracked)
RESOLVED
FIXED
mozilla33
People
(Reporter: automatedtester, Assigned: automatedtester)
References
()
Details
(Keywords: pi-marionette-spec)
Attachments
(1 file, 3 obsolete files)
13.28 KB,
patch
|
mdas
:
review+
|
Details | Diff | Splinter Review |
This will simplify getting the location and the size into 1 call
Assignee | ||
Comment 1•11 years ago
|
||
Assignee | ||
Comment 2•11 years ago
|
||
Attachment #8453159 -
Flags: review?(mdas)
Assignee | ||
Updated•11 years ago
|
Assignee: nobody → dburns
Status: NEW → ASSIGNED
Assignee | ||
Comment 3•11 years ago
|
||
Attachment #8453696 -
Flags: review?(mdas)
Assignee | ||
Updated•11 years ago
|
Attachment #8453159 -
Attachment is obsolete: true
Attachment #8453159 -
Flags: review?(mdas)
Comment 4•11 years ago
|
||
Comment on attachment 8453696 [details] [diff] [review]
Implement element.rect to marionette for getting element size and location
Review of attachment 8453696 [details] [diff] [review]:
-----------------------------------------------------------------
Looks good, just unsure about scrollbars in chrome
::: testing/marionette/client/marionette/marionette.py
@@ +169,5 @@
> +
> + * x and y represent the top left coordinates of the WebElement relative to top left corner of the document.
> + * height and the width will contain the height and the width of the DOMRect of the WebElement.
> +
> + The point (0, 0) refers to the top left corner of the document.
This line doesn't seem necessary, I think it's implied from the description of x and y. If you want to include it, you can add it in that description.
::: testing/marionette/marionette-server.js
@@ +1887,5 @@
> + aRequest.parameters.id, this.getCurrentWindow());
> + let clientRect = el.getBoundingClientRect();
> + this.sendResponse({x: clientRect.x, y: clientRect.y,
> + width: clientRect.width, height: clientRect.height},
> + command_id);
is it possible to scroll in a chrome window/frame? If so, we should add the pageX/pageY offset to the returned x,y coordinates
Assignee | ||
Comment 5•11 years ago
|
||
Attachment #8454938 -
Flags: review?(mdas)
Assignee | ||
Updated•11 years ago
|
Attachment #8453696 -
Attachment is obsolete: true
Attachment #8453696 -
Flags: review?(mdas)
Assignee | ||
Comment 6•11 years ago
|
||
updated patch after comments
Assignee | ||
Comment 7•11 years ago
|
||
Attachment #8454939 -
Flags: review?(mdas)
Assignee | ||
Updated•11 years ago
|
Attachment #8454938 -
Attachment is obsolete: true
Attachment #8454938 -
Flags: review?(mdas)
Assignee | ||
Comment 8•11 years ago
|
||
This time with 100% more update
Assignee | ||
Updated•11 years ago
|
Keywords: ateam-marionette-spec
Updated•11 years ago
|
Attachment #8454939 -
Flags: review?(mdas) → review+
Assignee | ||
Comment 9•11 years ago
|
||
Comment 10•11 years ago
|
||
Status: ASSIGNED → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla33
Comment 11•10 years ago
|
||
There is no way in Marionette to get the element's location relative to the screen instead of the document, right?
Assignee | ||
Comment 12•10 years ago
|
||
Martijn, use executeScript
Comment 13•10 years ago
|
||
(In reply to Martijn Wargers [:mwargers] (QA) from comment #11)
> There is no way in Marionette to get the element's location relative to the
> screen instead of the document, right?
The correct approach would be to follow the algorithm outlined here:
https://w3c.github.io/webdriver/webdriver-spec.html#dfn-calculate-the-absolute-position
And add window.screenX and window.screenY to the result.
Practically this means you can use getElementRect, look at the x and y properties and add these numbers to screenX and screenY.
Updated•2 years ago
|
Product: Testing → Remote Protocol
You need to log in
before you can comment on or make changes to this bug.
Description
•