copy paste with selenium?

  • 1 Replies
  • 2706 Views
copy paste with selenium?
« on: June 16, 2016, 18:39:30 pm »
can it be done ?

Re: copy paste with selenium?
« Reply #1 on: June 20, 2016, 10:39:05 am »
Yes, you could simulate a Ctrl+C, Ctrl+V with the keys methods:

Code
from selenium.webdriver.common.keys import Keys

ele = find_element_by_name("...")
elem.send_keys(Keys.CONTROL, 'a')
elem.send_keys(Keys.CONTROL, 'c')
elem.send_keys(Keys.CONTROL, 'v')

 

Sitemap 1 2 3 4 5 6 7 8