B2G/gecko/testing/marionette/marionette-server.js
/**
   * Find elements using the indicated search strategy.
   *
   * @param object aRequest
   *        'using' member indicates which search method to use
   *        'value' member is the value the client is looking for
   */
Find elements using the indicated search strategy.
@param object aRequest
'using' member indicates which search method to use
'value' member is the value the client is looking for
Find elements using the indicated search strategy . @param object aRequest ' using ' member indicates which search method to use ' value ' member is the value the client is looking for
function MDA_findElements(aRequest) {
    let command_id = this.command_id = this.getCommandId();
    if (this.context == "chrome") {
      let id;
      try {
        let on_success = this.sendResponse.bind(this);
        let on_error = this.sendError.bind(this);
        id = this.curBrowser.elementManager.find(this.getCurrentWindow(),
                                                 aRequest,
                                                 this.searchTimeout,
                                                 on_success,
                                                 on_error,
                                                 true,
                                                 command_id);
      }
      catch (e) {
        this.sendError(e.message, e.code, e.stack, command_id);
        return;
      }
    }
    else {
      this.sendAsync("findElementsContent",
                     {
                       value: aRequest.value,
                       using: aRequest.using,
                       element: aRequest.element,
                       searchTimeout: this.searchTimeout
                     },
                     command_id);
    }
  }
function MDA_findElements ( aRequest ) { let command_id = this . command_id = this . getCommandId ( ) ; if ( this . context == "chrome" ) { let id ; try { let on_success = this . sendResponse . bind ( this ) ; let on_error = this . sendError . bind ( this ) ; id = this . curBrowser . elementManager . find ( this . getCurrentWindow ( ) , aRequest , this . searchTimeout , on_success , on_error , true , command_id ) ; } catch ( e ) { this . sendError ( e . message , e . code , e . stack , command_id ) ; return ; } } else { this . sendAsync ( "findElementsContent" , { value : aRequest . value , using : aRequest . using , element : aRequest . element , searchTimeout : this . searchTimeout } , command_id ) ; } }
Find elements using the indicated search strategy.
Find elements using the indicated search strategy .