I want to organize work with several windows in parallel from one driver, but at any access to the driver object from more than one stream, an error occurs. Is it possible to do such a trick at all?
import os from selenium import webdriver drive = "C:\\chromedriver.exe" os.environ["webdriver.chrome.driver"] = drive driver = webdriver.Chrome(drive) class dv: def __init__(self,driver): self.driver = driver def get(self): print self.driver.current_url dvr = dv(driver) t1 = Thread(target = lambda: dvr.get()) t2 = Thread(target = lambda: dvr.get()) t1.start() t2.start() Even if we organize a strict queue of access to the driver through the Queue, the situation is almost the same, an error still occurs in one of the threads