Bug 819050 - Marionette response containing JSON object with element details instead of raw ID; r=mdas
authorDavid Burns <dburns@mozilla.com>
Tue, 15 Oct 2013 11:05:21 +0100
changeset 150799 772c99944a84eadb0ea8904a96bf56ed47a82a0b
parent 150798 65d2859ad74ad27bb035fd3cd61d630139943739
child 150800 732e97da71d59e293d89d30435b865a216c1ec50
push id25467
push userkwierso@gmail.com
push dateWed, 16 Oct 2013 03:15:33 +0000
treeherdermozilla-central@1990042c0ae6 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmdas
bugs819050
milestone27.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 819050 - Marionette response containing JSON object with element details instead of raw ID; r=mdas
testing/marionette/client/marionette/marionette.py
testing/marionette/marionette-elements.js
--- a/testing/marionette/client/marionette/marionette.py
+++ b/testing/marionette/client/marionette/marionette.py
@@ -1088,17 +1088,17 @@ class Marionette(object):
          an element id.
         :param id: If specified, search for elements only inside the element
          with the specified id.
         '''
         kwargs = { 'value': target, 'using': method }
         if id:
             kwargs['element'] = id
         response = self._send_message('findElement', 'value', **kwargs)
-        element = HTMLElement(self, response)
+        element = HTMLElement(self, response['ELEMENT'])
         return element
 
     def find_elements(self, method, target, id=None):
         '''
         Returns a list of all HTMLElement instances that match the specified method and target in the current context.
 
         An HTMLElement instance may be used to call other methods on the
         element, such as click().  If no element is immediately found, the
--- a/testing/marionette/marionette-elements.js
+++ b/testing/marionette/marionette-elements.js
@@ -287,17 +287,17 @@ ElementManager.prototype = {
         let ids = []
         for (let i = 0 ; i < found.length ; i++) {
           ids.push(this.addToKnownElements(found[i]));
         }
         on_success(ids, command_id);
       }
       else {
         let id = this.addToKnownElements(found);
-        on_success(id, command_id);
+        on_success({'ELEMENT':id}, command_id);
       }
       return;
     } else {
       if (!searchTimeout || new Date().getTime() - startTime > searchTimeout) {
         on_error("Unable to locate element: " + values.value, 7, null, command_id);
       } else {
         values.time = startTime;
         this.timer.initWithCallback(this.find.bind(this, win, values,