I have a script that is ran in pyvirtualdisplay and I need a value of a variable copied to my clipboard.
The following works (simplified version of my script):
from selenium import webdriver
import clipboard
driver = webdriver.Chrome("/home/name/chromedriver")
driver.get("http://pagewithvariable.com")
variable = find_element_by_name("variable")
clipboard.copy(variable)
The following doesn't work:
from selenium import webdriver
import clipboard
from pyvirtualdisplay import Display
display = Display(visible=0, size=(800, 600))
display.start()
driver = webdriver.Chrome("/home/name/chromedriver")
driver.get("http://pagewithvariable.com")
variable = find_element_by_name("variable")
clipboard.copy(variable)
The error I am getting while trying to run clipboard in pyvirtualdisplay is the following:
XIO: fatal IO error 11 (Resource temporarily unavailable) on X server ":1195"
after 11 requests (8 known processed) with 0 events remaining.
Help please :)