Paste command using Selenium
This works:
from selenium.webdriver.common.keys import Keysdef paste_keys(self, xpath, text): os.system("echo %s| clip" % text.strip()) el = self.driver.find_element_by_xpath(xpath) el.send_keys(Keys.CONTROL, 'v')
There cannot be a space after %s, for it will add that to the copied text.