B2G/gecko/testing/marionette/marionette-server.js
/**
   * Send key presses to element after focusing on it
   *
   * @param object aRequest
   *        'element' member holds the reference id to
   *        the element that will be checked
   *        'value' member holds the value to send to the element
   */
Send key presses to element after focusing on it
@param object aRequest
'element' member holds the reference id to
the element that will be checked
'value' member holds the value to send to the element
Send key presses to element after focusing on it @param object aRequest ' element ' member holds the reference id to the element that will be checked ' value ' member holds the value to send to the element
function MDA_sendKeysToElement(aRequest) {
    let command_id = this.command_id = this.getCommandId();
    if (this.context == "chrome") {
      try {
        let el = this.curBrowser.elementManager.getKnownElement(
            aRequest.element, this.getCurrentWindow());
        el.focus();
        utils.sendString(aRequest.value.join(""), utils.window);
        this.sendOk(command_id);
      }
      catch (e) {
        this.sendError(e.message, e.code, e.stack, command_id);
      }
    }
    else {
      this.sendAsync("sendKeysToElement",
                     {
                       element:aRequest.element,
                       value: aRequest.value
                     },
                     command_id);
    }
  }
function MDA_sendKeysToElement ( aRequest ) { let command_id = this . command_id = this . getCommandId ( ) ; if ( this . context == "chrome" ) { try { let el = this . curBrowser . elementManager . getKnownElement ( aRequest . element , this . getCurrentWindow ( ) ) ; el . focus ( ) ; utils . sendString ( aRequest . value . join ( "" ) , utils . window ) ; this . sendOk ( command_id ) ; } catch ( e ) { this . sendError ( e . message , e . code , e . stack , command_id ) ; } } else { this . sendAsync ( "sendKeysToElement" , { element : aRequest . element , value : aRequest . value } , command_id ) ; } }
Send key presses to element after focusing on it
 @param object aRequest
        'element' member holds the reference id to
        the element that will be checked
        'value' member holds the value to send to the element
Send key presses to element after focusing on it @param object aRequest ' element ' member holds the reference id to the element that will be checked ' value ' member holds the value to send to the element