Is there any way to perform a copy and paste using Selenium 2 and the Python bindings?
I\'ve highlighted the element I want to copy and then I perform the following
Pretty simple actually:
from selenium.webdriver.common.keys import Keys
elem = find_element_by_name("our_element")
elem.send_keys("bar")
elem.send_keys(Keys.CONTROL, 'a') #highlight all in box
elem.send_keys(Keys.CONTROL, 'c') #copy
elem.send_keys(Keys.CONTROL, 'v') #paste
I imagine this could probably be extended to other commands as well