Closed Bug 803096 Opened 7 years ago Closed 7 years ago

Add HTMLElement.location to find location of element on the page

Categories

(Testing :: Marionette, defect)

x86
macOS
defect
Not set

Tracking

(firefox18 fixed, firefox19 fixed)

RESOLVED FIXED
mozilla19
Tracking Status
firefox18 --- fixed
firefox19 --- fixed

People

(Reporter: automatedtester, Assigned: automatedtester)

Details

Attachments

(1 file)

Selenium gives the user the ability to get the location of the element. We need to add this and I think it may help with debugging bug 801733
Assignee: nobody → dburns
Attachment #673039 - Flags: review?(mdas)
Comment on attachment 673039 [details] [diff] [review]
find the location of element

Review of attachment 673039 [details] [diff] [review]:
-----------------------------------------------------------------

lgtm

::: testing/marionette/client/marionette/tests/unit/test_position.py
@@ +5,5 @@
> +
> +    def test_should_get_element_position_back(self):
> +        test_url = self.marionette.absolute_url('rectangles.html')
> +        self.marionette.navigate(test_url)
> +        

extra whitespace

::: testing/marionette/marionette-listener.js
@@ +717,5 @@
> +function getElementPosition(msg) {
> +  try{
> +    let el = elementManager.getKnownElement(msg.json.element, curWindow);
> +    var x = el.offsetLeft;
> +    var y = el.offsetTop; 

trailing whitespace
Attachment #673039 - Flags: review?(mdas) → review+
https://hg.mozilla.org/mozilla-central/rev/49bf10b166f9
Status: NEW → RESOLVED
Closed: 7 years ago
Flags: in-testsuite+
Resolution: --- → FIXED
Target Milestone: --- → mozilla19
Whiteboard: [automation-needed-in-aurora]
You need to log in before you can comment on or make changes to this bug.