import os
def add_to_clipboard(text):
import tempfile
with tempfile.NamedTemporaryFile("w") as fp:
fp.write(text)
fp.flush()
command = "xclip < {}".format(fp.name)
os.system(command)
tried this .didnt work.
python selenium.I am automating stripe gateway but every time i send keys i.e. cc number or exp date. it get disordered. i found copy pasting the simplest fix. so i wanna know how to copy string inside a variable. i am using ubuntu 20.I tried pyperclip . some custom made functions from stack overflow . but none of em is working.