title: How can I use copy and paste with protractor on MAC with Chrome?
body: <p>How can I use copy and paste with protractor on MAC with Chrome?</p>
  
  <pre><code>newInput.sendKeys(protractor.Key.chord(browser.controlKey, "a"));
  newInput.sendKeys(protractor.Key.chord(browser.controlKey, "c"));
  newInput.sendKeys(protractor.Key.chord(browser.controlKey, "v"));
  </code></pre>
  
  <p>I have "undefined" when I use this code</p>
  
  <p>I use this code from this post <a href="https://stackoverflow.com/questions/33263091/using-cross-platform-keyboard-shortcuts-in-end-to-end-testing">Using cross-platform keyboard shortcuts in end-to-end testing</a> but it doesn't work:</p>
  
  <pre><code>browser.controlKey = protractor.Key.CONTROL; //browser.controlKey is     a global variable and can be accessed anywhere in the test specs
  browser.getCapabilities().then(function(capabilities){
      if(capabilities.caps_.platform === "MAC")
          browser.controlKey = protractor.Key.COMMAND;
  });
  
  elm.sendKeys(protractor.Key.chord(browser.controlKey, "c"));
  </code></pre>