I am writing a Selenium Project.
I tried to make a function that copies all the text inside a text file using ctrl + A, ctrl + C.
def Copy(driver) :
f = open("out1.txt") # open the text file
.click() #i need to click on the file
.send_keys(Keys.CONTROL, 'a') # select all the text
time.sleep(1)
.send_keys(Keys.CONTROL, 'c') # copy the text in my clipboard
f.close()
That s what I tried to code, but I did not manage.
Any help?
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…