Closed Bug 1274550 Opened 4 years ago Closed 4 years ago

Get Active Element incorrectly returns element reference instead of web element

Categories

(Testing :: Marionette, defect)

Version 3
defect
Not set
normal

Tracking

(firefox49 fixed)

RESOLVED FIXED
mozilla49
Tracking Status
firefox49 --- fixed

People

(Reporter: ato, Assigned: ato)

References

(Blocks 1 open bug)

Details

(Keywords: pi-marionette-server)

Attachments

(3 files)

The getActiveElement function in testing/marionette/listener.js incorrectly returns the element’s associated web element reference (UUID) as a string instead of a web element object representation.
Assignee: nobody → ato
Blocks: webdriver
Depends on: 1274274
Making this depend on bug 1274274 as that contains a refactor of the element store we need to use to solve this bug, and because I don’t like conflicts I will address this after that lands.
Comment on attachment 8756823 [details]
MozReview Request: Bug 1274550 - Return web element from Get Active Element; r?automatedtester

https://reviewboard.mozilla.org/r/55430/#review52192
Attachment #8756823 - Flags: review?(dburns) → review+
Attachment #8756824 - Flags: review?(dburns) → review+
Comment on attachment 8756824 [details]
MozReview Request: Bug 1274550 - Simplify test case for get_active_element; r?automatedtester

https://reviewboard.mozilla.org/r/55432/#review52194
Comment on attachment 8756825 [details]
MozReview Request: Bug 1274550 - Make get_active_element in Python client backwards compatible; r?automatedtester

https://reviewboard.mozilla.org/r/55434/#review52198

::: testing/marionette/client/marionette_driver/marionette.py:1682
(Diff revision 1)
>  
> -
>      def get_active_element(self):
> -        el = self._send_message("getActiveElement", key="value")
> +        el_or_ref = self._send_message("getActiveElement", key="value")
> +        if self.protocol < 3:
> -        return HTMLElement(self, el)
> +            return HTMLElement(self, el)

This needs to be updated to `el_or_ref`
Attachment #8756825 - Flags: review?(dburns) → review+
Comment on attachment 8756823 [details]
MozReview Request: Bug 1274550 - Return web element from Get Active Element; r?automatedtester

Review request updated; see interdiff: https://reviewboard.mozilla.org/r/55430/diff/1-2/
Comment on attachment 8756824 [details]
MozReview Request: Bug 1274550 - Simplify test case for get_active_element; r?automatedtester

Review request updated; see interdiff: https://reviewboard.mozilla.org/r/55432/diff/1-2/
Comment on attachment 8756825 [details]
MozReview Request: Bug 1274550 - Make get_active_element in Python client backwards compatible; r?automatedtester

Review request updated; see interdiff: https://reviewboard.mozilla.org/r/55434/diff/1-2/
Duplicate of this bug: 1280516
You need to log in before you can comment on or make changes to this bug.