title: how to execute copy/paste using selenium webdriver
body: <p>I want to execute a paste to a local variable already exist to an input text with selenium webdriver in java.
  for this I used this method:</p>
  
  <pre><code>public static void copyText(final String id, final String text) throws Exception {
          waitForJQueryProcessing(DRIVER, N_30);
          WebElement elem = DRIVER.findElement(By.id(id));
          DRIVER.findElement(By.id(id)).clear();
          Toolkit toolkit = Toolkit.getDefaultToolkit();
          Clipboard clipboard = toolkit.getSystemClipboard();
          StringSelection strSel = new StringSelection(text);
          clipboard.setContents(strSel, null);
          elem.sendKeys(Keys.chord(Keys.CONTROL, "v", text));
          System.out.println(text);
  
      }
  </code></pre>
  
  <p>When I execute the test, i will appear empty I don't know why ?</p>