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

前端 未结 29 3463
旧巷少年郎
旧巷少年郎 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:34

    Update:

    I am able to get through the issue and now I am able to access the chrome with desired url.

    Results of trying the provided solutions:

    I tried all the settings as provided above but I was unable to resolve the issue

    Explanation regarding the issue:

    As per my observation DevToolsActivePort file doesn't exist is caused when chrome is unable to find its reference in scoped_dirXXXXX folder.

    Steps taken to solve the issue

    1. I have killed all the chrome processes and chrome driver processes.
    2. Added the below code to invoke the chrome

      System.setProperty("webdriver.chrome.driver","pathto\\chromedriver.exe");    
      ChromeOptions options = new ChromeOptions();
      options.setExperimentalOption("useAutomationExtension", false);
      WebDriver driver = new ChromeDriver(options);
      driver.get(url);
      

    Using the above steps I was able to resolve the issue.

    Thanks for your answers.

提交回复
热议问题