How to fix selenium “DevToolsActivePort file doesn't exist” exception in Python [duplicate]
问题 This question already has answers here : WebDriverException: unknown error: DevToolsActivePort file doesn't exist while trying to initiate Chrome Browser (21 answers) Closed 8 months ago . When I use both arguments --headless and user-data-dir . Selenium raise selenium.common.exceptions.WebDriverException: Message: unknown error: DevToolsActivePort file doesn't exist exception. If only 1 of them is used, then everything works as needs. I tried to swap arguments and remove some of them.