WebDriverException: unknown error: DevToolsActivePort file doesn't exist while trying to initiate Chrome Browser

前端 未结 29 3374
旧巷少年郎
旧巷少年郎 2020-11-21 07:11

I am trying to launch chrome with an URL, the browser launches and it does nothing after that.

I am seeing the below error after 1 minute:

Unable to         


        
29条回答
  •  轻奢々
    轻奢々 (楼主)
    2020-11-21 07:39

    Had the same issue. I am running the selenium script on Google cloud VM.

    options.addArguments("--headless");
    

    The above line resolved my issue. I removed the other optional arguments. I think the rest lines of code mentioned in other answers did not have any effect on resolving the issue on the cloud VM.

提交回复
热议问题