0

I have a web scraper using python with undetected_chromedriver. It is installed in a Windows Server 2016 from Amazon Lightsail. I am using RDP to access the server and to execute the script in cmd. When I execute the script it works perfectly fine, but when I close the RDP session, after a couple of minutes it raises TimeoutException from WebDriverWait.until. It seems like it can't find the element when I close the RDP.

def wait_vis(driver: uc.Chrome, seconds: float):
    WebDriverWait(driver, seconds).until(
        EC.presence_of_element_located((By.XPATH, "//div[contains(@class, 'ia- 
        ThreeBounces')]"))
)
zvz
  • 112
  • 6

0 Answers0