title: Selenium webdriver & powershell to highlight text from one element, copy it, and then paste
body: <p>So I need to highlight text from an element (textarea), copy that highlighted and then paste it into another element.</p>
  
  <p>Storing the value from the first element and then populate the other element using SendKeys is not an option for me. Because then I will run into other issues with a javascript.</p>
  
  <p>This is an example on how far I've got so far:</p>
  
  <pre><code># Creating FirefoxDriver
  $driver = New-Object OpenQA.Selenium.Firefox.FirefoxDriver
  
  # Go to made up URL
  $driver.url = "https://www.madeupdomain.com/"
  
  # Find element and store in $MyElement
  $MyElement = $driver.FindElementByXPath("//*[@id='MadeUpTextAreaElementId']")
  
  # Attempt to highlight all
  $MyElement.SendKeys($driver.keys.CONTROL + 'A')
  
  # Attempt to copy text from text
  $MyElement.SendKeys($driver.keys.CONTROL + 'C')
  
  # Find another element to paste text to
  $MyOtherElement = $driver.FindElementByXPath("//*[@id='AnotherMadeUpTextAreaElementId']"
  
  # Attempt to paste copied text to another element
  $MyOtherElement.SendKeys($driver.keys.CONTROL + 'V')
  </code></pre>
  
  <p>But this will simply type in "A" and "C" into the first element, and then "V" into the the last element.</p>
  
  <p>Guessing the issue is with the "$driver.keys.CONTROL" parts. How do I get Selenium to understand it's a keycombo I want to perform?</p>