Why it isnt working
from selenium import webdriver
import undetected_chromedriver as uc
if __name__ =='__main__':
options = uc.ChromeOptions()
options.add_argument("--headless")
driver = uc.Chrome(options=options)
driver.get('https://nowsecure.nl')
driver.save_screenshot('nowsecure.png')
The code executes and the screenshot is taken and saved but de webpage window doesn't open, even taking out the screenshot code line the webpage doesn't open so i can use it.
Comment this line: