Code
options = webdriver.ChromeOptions()
options.add_argument('start-maximized')
options.add_argument("--headless")
options.add_argument("user-data-dir=C:\\Users\\sd\\AppData\\Local\\Google\\Chrome\\User Data\\Profile 1\\Default")
driver = webdriver.Chrome(options=options)If i run it without headless, with my browser open, everything works good. the Chrome profile works and the selenium script runs well.
but if i try to go headless, i get error. pls help i am noob
Code
selenium.common.exceptions.NoSuchElementException: Message: no such element: Unable to locate element: {"method":"xpath","selector":"//input[@type='file']"}
(Session info: headless chrome=87.0.410.191)


