File size: 476 Bytes
25ae7fe
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
import undetected_chromedriver as uc
import time

def test():
    print("Starting UC test...")
    try:
        options = uc.ChromeOptions()
        options.add_argument('--headless')
        driver = uc.Chrome(options=options)
        print("Driver started successfully!")
        driver.get("https://www.google.com")
        print(f"Title: {driver.title}")
        driver.quit()
    except Exception as e:
        print(f"Error: {e}")

if __name__ == "__main__":
    test()